zit 0.14.9 makes crosslink and annotate use a small, fixed amount of
memory however large the store's record cache is.
This release is from trunk. Stores, caches and the wire are unchanged from 0.14.8; nothing is rebuilt on upgrade.
crosslink and annotate
crosslink mapped the whole record cache in .zit-cache into memory,
checked it, and read it there, so every page of it stayed resident until
the command ended. Its memory grew with the cache: a forge saw 2.4 GB for
one command on a store whose cache is 3.2 GB.
The cache is now read through a window that moves along it, 8 MiB at a
time. On stores whose caches are 25 MB, 125 MB and 498 MB, crosslink
peaks at 11 to 12 MB, where it took 27, 122 and 479 MB. annotate reading
a cold cache goes from 481 MB to 14 MB on the largest of those. The output
is the same byte for byte, and the time is the same within measurement.
Still read whole: the cache when a writing command opens the store (merge,
update, amend, archive, landing) or grep does, the first open
after the store has grown, and checkpoint show and checkpoint verify.
A tree check-in was read twice
Found by the nightly simulation on its first run with safety checks on. A tree check-in already read for a check-in stored ahead of it was read a second time when its own turn came. The second reading gave the same files, so no output was wrong; it cost the time of the walk, and made the cached copy count double, so it was dropped from memory sooner than it should have been. It is read once now. The fault is as old as 0.6.2.
Qualification
The release manifest records native qualification against the exact tagged source archive on macOS ARM64, Linux x86-64 and Linux ARM64, using the pinned Zig 0.17.0 toolchain. Publication is gated on unit and end-to-end tests, Git differentials, deterministic simulation, seeded fuzzing, and Fossil interoperability checks on every distributed target.
For the basis of the conformance claim, see the 0.1.0 release notes.