You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cache: scoped loads re-parse out-of-range files every run because their entries aren't visible to reconcileFile #1034
Follow-up to #1032 (the republish half is fixed by the merge-shard no-op check).
Under #1007's month-scoped loadCache, files whose bucket is out of range have no entry in section.files, so reconcileFile sees them as uncached and the parser re-parses them on every ranged run (status --format json etc.), producing an identical entry. Observed on a real corpus: Claude files in an out-of-scope month, plus SQLite-backed sources (cursor state.vscdb, warp.sqlite) whose mtime moves constantly. It's now a wasted parse + one shard read, no longer a write.
Fix direction: have the scoped load expose the fingerprints (dev/ino/mtime/size/offset) of entries in skipped shards — cheap, e.g. a fingerprint index in the envelope or a per-shard sidecar — so reconcileFile can classify them unchanged without loading turn bodies. That's an envelope format change (lossless), so it belongs in its own PR with the usual migration/two-writer tests.
Closing with #1057: the described re-parse waste is real and was measured live (main re-parses the same 1,080 unchanged out-of-range files on every warm scoped run, never converging) — but eliminating 89% of it (#1057, mechanism verified working) moved neither wall-clock nor CPU time on either of two real corpora, because the scope-independent stat()/fingerprint discovery sweep over the full tree (~6.4s over 21k files) dominates every dated command. The bottleneck is the sweep, not the re-parses. A successor issue targeting the discovery sweep would be the fix that actually shows up on a stopwatch.
Activity
iamtoruk commentedon Aug 22, 2026
Closing with #1057: the described re-parse waste is real and was measured live (main re-parses the same 1,080 unchanged out-of-range files on every warm scoped run, never converging) — but eliminating 89% of it (#1057, mechanism verified working) moved neither wall-clock nor CPU time on either of two real corpora, because the scope-independent stat()/fingerprint discovery sweep over the full tree (~6.4s over 21k files) dominates every dated command. The bottleneck is the sweep, not the re-parses. A successor issue targeting the discovery sweep would be the fix that actually shows up on a stopwatch.