Usage history reader: final measurements
PR #36009 · head 32984e99 · 13 November 2026
Reusing one 256 KiB buffer per plain transcript reduces CPU work. Retained line fragments are copied before reuse. Compressed transcripts keep their existing stream.
Confirmed: less CPU work
Ten paired rounds on one clean large VM. Baseline normalized to 100; changes are the benchmark’s paired estimates.
The middle half of paired cycle changes was −20.8% to −14.7%; instructions −11.9% to −10.2%. Counters cover the whole command, including three Vitest startups.
No proven elapsed-time improvement. The paired wall estimate was −4.6%, below the benchmark’s 10% noise floor.
Per-read medians, descriptive
| Phase | Elapsed before → after | CPU before → after | RSS before → after |
|---|---|---|---|
| Cold first | 3467 → 3139 ms | 10048 → 6817 ms | 621 → 574 MB |
| Unchanged warm | 102 → 106 ms | 168 → 177 ms | 631 → 584 MB |
| Persisted restart | 165 → 171 ms | 335 → 344 ms | 459 → 459 MB |
| Append first | 234 → 208 ms | 569 → 389 ms | 480 → 462 MB |
These phase medians describe captured samples, not separate validated elapsed-time speedups. CPU time sums across threads. RSS is sampled process memory, not peak RSS.
Method and correctness
Product base 43ce39595b, candidate 32984e99, both with identical benchmark kit. Deterministic content-free corpus: about 3.2 GB, 1,412 in-window generated files plus 311 older files. Append grows 50 files per provider by 64 KiB. The same unchanged and appended summary fingerprints matched on both versions. Four focused suites passed all 109 tests; CI is green. All three council reviewers scored 9/10 and the final proof audit found no code/proof gaps.
The unchanged kit previously passed a base/base self-check. The final comparison used fleet-boat-bench run --type large --prepare 'bash .bench/usage/phase.sh prepare' refs/usage-bench/harness-base-rebased refs/usage-bench/harness-head-rebased -- 'bash .bench/usage/phase.sh all'. Full phase logs were copied before VM deletion: 67 baseline rows and 73 candidate rows. Harness commits and raw logs remain local; they are not shipped product files.
Limits
Performance for 256 KiB–8 MiB fragmented lines, tiny appended tails, GC event counts, and network-mounted storage was not measured. The VM used local disk. No WAN, reduced byte-volume, compressed-reader speedup, or general loading-time speedup is claimed. Existing tests cover correctness across chunk boundaries, streaming transitions, UTF-8/CRLF tails, append/rewrite guards, compressed decoding and failures.
PostPlan uses true-black fallback colors because the active client theme could not be read.