Skip to content

Speed up initial full indexing - #5155

Merged
Widthdom merged 13 commits into
mainfrom
perf-initial-full-index-20260823
Aug 23, 2026
Merged

Speed up initial full indexing#5155
Widthdom merged 13 commits into
mainfrom
perf-initial-full-index-20260823

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • reduce empty-database full-index time by optimizing SQLite batch parameters, authoritative fresh inserts, RETURNING row mapping, and deferred reference indexes
  • avoid impossible or repeated symbol-regex work through required-literal gates and recoverable-miss caching
  • materialize C# instantiation candidate families set-wise and reuse reference-line extraction state across C#, Java, Kotlin, and Swift paths
  • add cold-path, persistence, graph parity, concurrency, cancellation, and allocation regression coverage

The repository-scale Release cold-index benchmark improved from 102.8 seconds on origin/main to 55.96 seconds at this head (45.6% faster), while indexing 1,423 files, 52,050 symbols, and 510,274 references. Total allocation was 17.35 GB, down from approximately 19 GB.

Validation

  • dotnet restore CodeIndex.sln --locked-mode -m:1 -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln --configuration Release --no-restore -m:1 -p:UseSharedCompilation=false — 0 warnings, 0 errors
  • full Release tests:
    • net8.0: 11,816 passed, 0 failed, 9 skipped
    • net9.0: 11,336 passed, 0 failed, 426 skipped
  • dotnet format whitespace CodeIndex.sln --verify-no-changes --no-restore --verbosity minimal
  • dotnet run --project tools/CodeIndex.Changelog --configuration Release --no-build -- check — 11 fragments validated
  • git diff --check origin/main..HEAD
  • empty-database Release full index plus status --check — workspace matched, graph/fold ready, no reference-extraction cap hits
  • canonical root and workspace status --check — all members ready
  • independent adversarial review: No blocking/actionable issues found.

Documentation and changelog

Updated DEVELOPER_GUIDE.md and TESTING_GUIDE.md.

Changelog fragments:

  • changelog.d/unreleased/+authoritative-fresh-raw-bulk-inserts.changed.md
  • changelog.d/unreleased/+authoritative-fresh-reference-index-deferral.changed.md
  • changelog.d/unreleased/+cold-full-index-contract.internal.md
  • changelog.d/unreleased/+csharp-impossible-regex-probes.internal.md
  • changelog.d/unreleased/+csharp-instantiation-fallback.changed.md
  • changelog.d/unreleased/+csharp-recoverable-regex-cache.changed.md
  • changelog.d/unreleased/+fresh-reference-integration-contracts.internal.md
  • changelog.d/unreleased/+numeric-batch-parameters.changed.md
  • changelog.d/unreleased/+reference-line-ordinals.changed.md
  • changelog.d/unreleased/+reference-line-resolver-reuse.changed.md
  • changelog.d/unreleased/+symbol-required-any-literals.changed.md

Follow-up candidates

None identified.

@Widthdom
Widthdom merged commit 2cb5432 into main Aug 23, 2026
11 checks passed
@Widthdom
Widthdom deleted the perf-initial-full-index-20260823 branch August 23, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant