Latest Results
docs(cascade): document cascade cost with a scaling chart
The TTL Cascade page explained semantics but never what a cascade costs, so
nothing warned a reader that reach size is the thing that matters.
Adds a Cost and Scaling section: a log-log chart of measured wall time
against keys reached (1k -> 500k, slope 1.03, so ten times the links costs
about ten times the time), a table showing shape changes the constant and
not the growth rate, and two warnings that were previously undocumented --
the server is blocked for the whole walk and the kill window closes once
the write phase starts, and every write re-walks the whole subtree, which
makes node-by-node graph building quadratic (a 1,000-node chain issues
500,500 EXPIREs, not 1,000).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> bench(cascade): add 1M-node cascade benchmarks in three graph shapes
Existing cascade benchmarks top out at 10 nodes, so nothing covered the
scale where the walk actually hurts. Adds fan-out (one root over 1M
edge-free leaves), chain (1M nodes, one hop each), and tree (branch 10,
depth 6, 1,111,111 nodes) — the shapes that isolate width, depth, and
per-interior-node JSON.GET cost respectively.
Measured locally on Redis Stack 7.2: fan-out 3.22s, chain 7.89s, tree
10.26s; whole file 3m59s. Size is env overridable via
BENCHMARK_CASCADE_LARGE_SIZE for constrained runners.
Fixtures are written through a plain pipeline rather than ainsert:
ainsert is quadratic in batch size for models holding a Reference field
(1k/2k/4k nodes take 1.9s/7.3s/29.4s versus 0.04s/0.07s/0.11s edge-free),
which makes a million-node fixture unbuildable. Tracked separately.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Latest Branches
+14%
-1%
gsd/262-cascade-fk-multi-target-pr -1%
© 2026 CodSpeed Technology