Artifact c4ef8ad57a50c897673738a3f9a08852012d8ac965e7d8db3bb4c41116130bee:
- File
internal/manifest/tree_memo_test.go
-
2026-10-26 00:02:06
— part of check-in
[94f61db228]
on branch main
— perf(manifest): memoize parsed sub-manifests by hash
draft-fossil-submanifests-00 ยง7.4: enumeration results SHOULD be cached keyed by artifact name, so a rebuild parses each distinct sub-manifest once. The tree walk's loader now serves a resolved node from, and keeps it in, a new byte-bounded LRU memo on content.Cache (DerivedSized), keyed by the node's hash and charged its bytes, within a quarter of the cache's budget. The existing 32-entry Derived FIFO is sized for a few parsed check-ins; a tree's working set is every distinct node, which would thrash it and evict those check-ins.
Only a node that resolved is kept, so a phantom is looked up afresh and fails the walk as before. Depth, cycle and node-count bounds stay per walk. The memo is dropped with Derived on Invalidate and Clear, and the Repo's cache is replaced at every write.
Listing a tree that differs from one already read in one leaf now parses its manifest and that leaf; listing every check-in of zit's recorded tree history parses 48 sub-manifests instead of 109. SM-7.4-1 is covered.
Tracked in #493. (user: [email protected], size: 4374) [annotate] [blame] [check-ins using]
-
2026-10-26 00:11:36
— part of check-in
[d82fddda6a]
on branch main
— Merge pull request #501 from danmestas/perf/submanifest-node-memo
perf(manifest): memoize parsed sub-manifests by hash (user: [email protected], size: 4374) [annotate] [blame] [check-ins using]
-
2026-10-26 00:02:06
— part of check-in
[94f61db228]
on branch main
— perf(manifest): memoize parsed sub-manifests by hash