Skip to content

perf: share lazy semantic and outline indices - #4

Merged
deiteris merged 1 commit into
masterfrom
perf/service-shared-indices
Oct 10, 2026
Merged

deiteris merged 1 commit into
masterfrom
perf/service-shared-indices

Conversation

@deiteris

@deiteris deiteris commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Share lazy declaration/file enumeration, ID lookup and reverse hierarchy on each snapshot; keep all query-specific populations off diagnostics-only rebuilds.
  • Share one typed-data index between definition, hover and inlays without initializing hover presentation for navigation.
  • Cache requested-file outlines, including empty results, and preserve old-snapshot/separate-root semantics.
  • Navigate multiple-inheritance wrappers to their bound declarations while preserving named aliases and declaration order.
  • Add a portable sparse three-edit navigation workload, meaningful reach tests and reproducible cost/ownership evidence.

Performance and acceptance

A/B control: 3912118. Navigation sequence time -17.0% (4.1% noise), peak -3.8%, retained +2.9%. Snapshot-first mixed sequence time -8.3% (6.9% noise), peak +5.7%, retained +7.5%. Source-first time remains within 19.4% noise, peak +3.4%, retained +7.5%. Times cover three edit/query cycles.

The full bundle is accepted with about 1.93 MB additional snapshot-local mixed retention, chiefly the outline cache (about 1.74 MB measured by release). Diagnostic-only allocation is effectively unchanged; no diagnostics speedup is attributed to query caches. Cold hover/inlay times remain within noise.

Report: docs/reports/2026-10-10/service-shared-indices.md.

Verification

  • Ruff, formatting, strict mypy and full pytest: 5879 passed, 69 skipped, 1 xfailed; pinned TCK initialized.
  • Focused forced pure-Python YAML: 75 passed.
  • Navigation and both mixed sequence linearity checks pass.
  • Recovery documents keep measurement records free of conversation history; recorded import/checkout paths are relative.
  • CI/platform checks must pass before merge.

🤖 Generated with Claude Code

Cache declaration enumeration, file grouping, ID lookup and reverse hierarchy independently on the snapshot. Share typed-data navigation before hover presentation and cache requested-file outlines. Preserve parent/child ordering and navigate multiple-inheritance wrappers to their bound declarations.

A/B vs 3912118: service-navigation/unwrap time -17.0% (4.1% noise), peak -3.8%, kept +2.9%. Snapshot-first mixed time -8.3% (6.9% noise), peak +5.7%, kept +7.5%; source-first time within 19.4% noise, peak +3.4%, kept +7.5%. Accept the about 1.93 MB snapshot-local retention, chiefly the outline cache. Hover/inlay times stay within noise, kept +0.7%/+1.0%. Diagnostic-only query caches remain unpopulated, with allocation effectively unchanged.

Add a sparse three-edit navigation workload with fixed request counts and timing/allocation reach checks. Keep recovery documentation technical and recorded import/checkout paths relative, including wrong-checkout errors. Gate: Ruff, format, strict mypy, 5879 passed/69 skipped/1 xfailed. Navigation and both mixed linearity checks pass. Record phase/noise limits and cache ownership.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@deiteris
deiteris force-pushed the perf/service-shared-indices branch from 60dcb0c to 2f1b63c Compare October 10, 2026 20:38
@deiteris
deiteris merged commit 069b41f into master Oct 10, 2026
40 checks passed
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