Fix performance issues.

This commit is contained in:
Colby McHenry
2026-02-11 16:11:50 -06:00
parent a7fc5853a2
commit ce504c642a
6 changed files with 388 additions and 75 deletions
+6 -3
View File
@@ -449,15 +449,18 @@ export class CodeGraph {
// Resolve references if files were updated
if (result.filesAdded > 0 || result.filesModified > 0) {
const unresolvedCount = this.queries.getUnresolvedReferences().length;
// Scope resolution to changed files when available (git fast path)
const unresolvedRefs = result.changedFilePaths
? this.queries.getUnresolvedReferencesByFiles(result.changedFilePaths)
: this.queries.getUnresolvedReferences();
options.onProgress?.({
phase: 'resolving',
current: 0,
total: unresolvedCount,
total: unresolvedRefs.length,
});
this.resolveReferences((current, total) => {
this.resolver.resolveAndPersist(unresolvedRefs, (current, total) => {
options.onProgress?.({
phase: 'resolving',
current,