Artifact 2d7d198d5072443ad2665f31b10a2e9870addd5d4cb499ff783e0cc90dd70643:
- File
internal/content/memo.go
-
2026-10-29 15:10:44
— part of check-in
[39b24649b0]
on branch perf/memo-review-nits
— perf(content): check a kept tree's expandability per hit, cached per lineage
Each view that served a kept tree listed every rid its store could not expand, by a recursive walk seeded with all of the store's phantoms. A horizon-serving peer can hold tens of thousands of phantoms: on a copy of fossil-scm.org's store with 39.7k of them, that list cost about 100ms of every warm view (200ms against 105ms).
A hit now walks the kept tree's own chain of delta sources up to the first rid whose answer is known. Within a lineage an answer never changes, so views publish the answers they found and the memo keeps those of its latest lineage, which replaces them; each delta step is read once per lineage, for the trees actually looked up. The per-lineage scan for delta sources a store holds no row for goes with it: the walk meets a missing row itself. On fossil-scm.org the first view of a lineage to serve 1000 kept trees pays about 10ms; whole history after a full read is unchanged.
The stock-fossil shun test passed with both guards removed: shunning a check-in drops it from the held set, so its tree is never asked for. It is replaced by a purged baseline that the held set's delta manifests go on citing, with the horizon asserted placed. Stock fossil never leaves a store so (its purge refuses a baseline without its deltas, and rebuild leaves those uncrosslinked), so the test deletes the baseline's rows as such a purge would, from a store fossil wrote; a second case puts another blob at the freed rid, which only the held-name check catches.
Also documents why a lineage numbered at view start rather than at the read snapshot is safe: a view on an older snapshot may publish over a newer store, which costs the next view an extension or a full read and is never wrong. (user: [email protected], size: 24977) [annotate] [blame] [check-ins using]
-
2026-10-29 16:28:38
— part of check-in
[23c3e0486e]
on branch main
— Merge pull request #528 from danmestas/perf/memo-review-nits
perf(content): memo review follow-ups: per-hit expandability, purged-baseline test, lineage order (user: [email protected], size: 24977) [annotate] [blame] [check-ins using]
-
2026-10-29 15:10:44
— part of check-in
[39b24649b0]
on branch perf/memo-review-nits
— perf(content): check a kept tree's expandability per hit, cached per lineage