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

Method warmCaches

src/resolution/index.ts:349–359  ·  view source on GitHub ↗

* Pre-build lightweight caches for resolution. * Node lookups are now handled by indexed SQLite queries instead of * loading all nodes into memory (which caused OOM on large codebases). * We cache the set of known symbol names for fast pre-filtering.

()

Source from the content-addressed store, hash-verified

347 * We cache the set of known symbol names for fast pre-filtering.
348 */
349 warmCaches(): void {
350 if (this.cachesWarmed) return;
351
352 // Only cache the set of known file paths (lightweight string set)
353 this.knownFiles = new Set(this.queries.getAllFilePaths());
354
355 // Cache all distinct symbol names for fast pre-filtering (just strings, not full nodes)
356 this.knownNames = new Set(this.queries.getAllNodeNames());
357
358 this.cachesWarmed = true;
359 }
360
361 /**
362 * warmCaches for the async resolution entry points: streams the distinct

Callers 3

resolveAllMethod · 0.95
resolveBatchYieldingMethod · 0.95

Calls 2

getAllFilePathsMethod · 0.80
getAllNodeNamesMethod · 0.80

Tested by

no test coverage detected