v2.6.9 β output-invariant performance pass (FTS5 once per build, merkle once per tick, stmt/view reuse)
LatestPerformance pass β zero behavioral change
Every change in this release is output-invariant: same index, same ss-* tool output, just faster and leaner. Verified with a three-layer parity protocol on a 226-file fixture corpus β the post-change build's logical dump (vector rows incl. embedding-blob hashes, entities, relationship content, FTS5 integrity-check, 12 MATCH probes) is exactly identical to a pre-change same-path rerun, and an 18-command ss-search/ss-grep/ss-find/ss-semantic/ss-read/ss-trace battery against a frozen index is byte-identical (only latency/pid telemetry fields move).
Indexing
- FTS5 mirrors rebuilt once per graph build instead of once per 100-file batch.
'rebuild'reconstructs the whole external-content index, so per-batch rebuilds were O(entities Γ batches) work discarded by the next batch. Code Graph phase 4.1s β 1.9s on the parity corpus; the win grows with repo size. - File discovery stats and the full-reindex hash pass now run in order-preserving batches (discovery 126ms β 45ms, state save 57ms β 33ms).
- Duplicate per-chunk embedding-text build eliminated (
li_greedy_textreusesembedding_textunder the production variant); the full-index path skips the never-persisted dedup fingerprint; LI skip-policy globs are precompiled.
Incremental reconcile
merkle-state.jsonparsed once per tick instead of ~100Γ (it was re-read per dirty file + per modified file + per cutoff-skip; multi-MB on real repos, every tick).- Fixed-SQL statements compiled once per tick connection via a new per-connection
prepareCachedhelper.
Query path
- Prepared-statement reuse across all 17 code-graph repository call sites β
ss-trace2.2β2.7Γ faster in the parity battery (256/378/258ms β 117/147/97ms). - Hoisted/memoized per-result work in boost, fusion, MMR, and file-kind ranking; identifier-anchored retrieval now buckets LI chunks by file (O(entities Γ chunks) β O(chunks + entities));
ss-semanticreads the reconcile manifest once per request (was 3Γ).
Vector / storage layer
- WASM memory views cached in all 7 distance kernels (was a fresh typed-array allocation per Hamming/int8/MaxSim call β millions per HNSW build).
FloatVectorStore.loadadopts the read buffer instead of copying the whole (~99MB on large repos) vector file; HNSW search heaps pooled; tombstone bitmap loads as a view.- Native
maxsim_score_batch(+pertoken):BufferβVec<i8>is now a single bit-identical memcpy β ships in this release's napi builds.
Verification
- 7,060-test suite: the only full-suite failures are pre-existing daemon-lifecycle flakes that reproduce (worse) on a clean-HEAD worktree under identical load; all affected files pass standalone on both trees.
- Parity artifacts (logical dumps, noise-envelope calibration runs, query-battery outputs) captured before/after on identical corpora.
No index rebuild required β existing indexes are fully compatible.