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

Method prewarm

src/extraction/parse-pool.ts:218–224  ·  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

216 * load, ~hundreds of ms, and growth only triggers as queue pressure builds).
217 */
218 prewarm(): void {
219 while (this.workers.size < this.maxSize) {
220 const before = this.workers.size;
221 this.spawnOne();
222 if (this.workers.size === before) break; // spawn failed / breaker tripped
223 }
224 }
225
226 /** Pool size cap (for logging). */
227 get size(): number { return this.maxSize; }

Callers 1

indexAllMethod · 0.80

Calls 1

spawnOneMethod · 0.95

Tested by

no test coverage detected