Optimize initial full indexing for large codebases - #5076
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve the first full index of a large, empty codebase by removing repeated graph, extraction, worker-protocol, fold-readiness, and persistence work while preserving rebuild, update, retained-graph, plugin, hook, cancellation, and recovery contracts.
This PR contains 16 cohesive commits. Candidates that did not meet their measured acceptance thresholds were reverted and are not included.
What changed
Why
Fresh indexing previously repeated work that was useful for incremental updates but redundant for a database proven empty. It also rediscovered configuration, re-extracted or cloned C# prepass results, ran impossible regular expressions, decoded worker input twice, and re-folded every stored name during final readiness.
The changes specialize only the authoritative fresh paths and fall back to the existing full validation/resolution behavior whenever ownership or recovery assumptions are not proven.
Impact
Large first-time indexes perform less SQL graph work, fewer pattern scans, fewer configuration discoveries and UTF-8 conversions, and substantially less row-proportional managed allocation. Existing databases, rebuilds, updates, symbols-only runs, retained/scoped graphs, custom extractors, hooks, and public writer calls keep their established contracts.
Validation
dotnet format --verify-no-changes: passedgit diff --check origin/main..HEAD: passedNo blocking/actionable issues found.Collaborator checklist