MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / prewarm

Method prewarm

src/extraction/parse-pool.ts:303–309  ·  view source on GitHub ↗

* Spawn the pool up front, as far as the run is worth it. The default * demand-driven growth avoids paying worker boot for small jobs, but a bulk * index knows how much work is coming — on a fast repo the one-by-one ramp-up * otherwise consumes most of the parse phase (each worker boot is a

()

Source from the content-addressed store, hash-verified

301 * pressure builds).
302 */
303 prewarm(): void {
304 while (this.workers.size < this.wantedSize()) {
305 const before = this.workers.size;
306 this.spawnOne();
307 if (this.workers.size === before) break; // spawn failed / breaker tripped
308 }
309 }
310
311 /** The workers the parsing still to come is worth. */
312 private wantedSize(): number {

Callers 2

indexAllMethod · 0.80
parse-pool.test.tsFile · 0.80

Calls 2

wantedSizeMethod · 0.95
spawnOneMethod · 0.95

Tested by

no test coverage detected