Repository navigation
fix: bound large-repo memory and traversal work - #1583
danusha2345 wants to merge 6 commits into
Conversation
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
|
Merged current |
61c3a3a to
f249ca4
Compare
f249ca4 to
23884a4
Compare
23884a4 to
904c9d5
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recycling an idle pool terminated every used worker. On Windows, a worker thread that ends while V8's concurrent marker is still marking its heap can take the whole process down (worker-teardown.ts), and the idle shrink runs in the long-lived daemon after every burst of queries. The pool now retires an idle worker the way the resolver pool closes its workers: it posts 'close', and the worker closes its project connections, runs collectBeforeExit() and calls process.exit(0). A worker that has not exited after 5 s is terminated as before, through terminateStarted(). destroy() is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
904c9d5 to
61514c4
Compare
Addresses #1553.
Rebased onto current
main(6421644). The pieces that landed upstream in the meantime are dropped from this PR:readFileCached, shared size constantcallback-synthesizer.tsWhat remains
lru-cache.ts).worker-teardown.tsmeasured as safe on Windows. Only a worker that does not exit within 5 s is terminated, through the pool's own start-awareterminateStarted().fileor a smallerdepth.Tests
The PR's own tests pass, as do graph, lru-cache, query-pool (including a real worker that retires with exit code 0 and is never terminated), mcp-daemon, worker-teardown, the resolution suites, the C function-pointer and synthesis suites and CFML. Full suite on Linux (Node 22, native kernel): 6,205 passed, 34 skipped, 0 failed. The per-file memos #2362 and #2344 added are untouched: on betaflight
src/and Django the graph is byte-identical with and without this branch. Not run on Windows.🤖 Generated with Claude Code