CODE-071: the walk parses every commit 3-4x and holds the DAG twice — 2 GB on linux

Now
OPEN
Sev
MED
Rep
///bee
Ask
gritzko
Rev
///bee#8cb69a0
See
CODE-034
See
LITE-006

Input

Context

index/index.js:303:Wt clears the commit memo wholesale at 16384, so collect, topo and the emit loop each re-parse: 319243 reads for 81727 commits on git.git. Raising the cap alone took collect+topo 8.2 s -> 3.6 s (topo 5.4 -> 0.66 s, ODB reads 401k -> 164k) and on linux 161 s -> 68 s, but the memo holds author/subject strings and cost linux +1 GB RSS (2.08 -> 3.05 GB). :617/:672 build the whole DAG and then a second copy (deg + kids) before a single row is written — 2.08 GB on linux — and :467 st.byPB grows ~880 B/rev for the run's life (250k revs = 220 MB on git.git). A full linux rebuild does not fit in the 6 GB free today. Found in the 2026-09-18 index review.

Goals

collect hands topo and the emit loop a slim sha -> {parents, ts} map; Kahn straight off the parent edges without the second map; scope byPB to the paths in the current fold.

WIP

Design decisions

TODOs

Blockers and bummers

Outcome