Port performance improvements from PR #15

- SQLite performance pragmas: synchronous=NORMAL, 64MB cache,
  memory temp store, 256MB mmap (safe with WAL mode)
- Batch insert for unresolved refs: single transaction instead of
  N individual inserts per file
- Symbol caching (warmCaches): pre-load all nodes into memory maps
  before resolution, eliminating repeated SQLite queries per ref
- Async file I/O: fs.stat/readFile in indexFile() are now non-blocking
- Denormalize filePath/language onto UnresolvedReference: avoids N
  node lookups during resolution, with schema migration v2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Colby McHenry
2026-02-09 23:45:34 -06:00
co-authored by Claude Opus 4.6
parent e07250ed60
commit d80900f653
7 changed files with 149 additions and 23 deletions
+6
View File
@@ -257,6 +257,12 @@ export interface UnresolvedReference {
line: number;
column: number;
/** File path where reference occurs (denormalized for performance) */
filePath?: string;
/** Language of the source file (denormalized for performance) */
language?: Language;
/** Possible qualified names it might resolve to */
candidates?: string[];
}