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

Method prewarm

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

* Spawn the whole pool up front. The default demand-driven growth avoids * paying worker boot for small jobs, but a bulk index KNOWS every core will * be needed — on a fast repo the one-by-one ramp-up otherwise consumes most * of the parse phase (each worker boot is a fresh Node isolate + g

()

Source from the content-addressed store, hash-verified

235 * load, ~hundreds of ms, and growth only triggers as queue pressure builds).
236 */
237 prewarm(): void {
238 while (this.workers.size < this.maxSize) {
239 const before = this.workers.size;
240 this.spawnOne();
241 if (this.workers.size === before) break; // spawn failed / breaker tripped
242 }
243 }
244
245 /** Pool size cap (for logging). */
246 get size(): number { return this.maxSize; }

Callers 1

indexAllMethod · 0.80

Calls 1

spawnOneMethod · 0.95

Tested by

no test coverage detected