Public: anyone can read this; the crew can change it.

grepRepos: race the in-flight batch against codeBudgetMs so search answers within budget + 20 ms #7075

Closed opened this has it

Pull #7080 was closed

opened this

The budget only stops new batches of four (src/core/search.ts grepRepos); a slow batch already running still finishes. Race it against the budget, report moreCode, and add the slow-fake-grep test from #6142 asserting budget + 20 ms.

commented

Replaced by #7118. The reviews agree the race itself is right. Every round came back to the same two problems: abandoning batch 0 leaves a cold search with no code, and the module-global abandoned counter lets one caller stop everyone's search. #7111 (grep slots held until git exits, with stranger and member shares) is the cap the reviews asked for, so #7118 waits on it and drops the counter. #7118 also keeps batch 0 and tests with an injected runner, with no PATH shim, sleeps or wall-clock margins. #7112 now waits on #7118.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs