arborist/bench/slim_fts_parity_results
russell@unturf.com f7e0a2bd24
bench: chunk_fetch_speed (apsw vs blob GET) + archive session bench results
bench/chunk_fetch_speed.py — measure per-chunk fetch latency for the
two cloud paths a future JUST_ENOUGH=1 blob-publish move would
compare against: (1) apsw HttpRangeVFS on the big shard .db (current
FtsSidecarShardClient fallback path), (2) direct HTTP GET on a
same-bucket object (proxy for per-chunk blob fetch).

Measured 2026-05-31 against clones/full-bench/000.db (12.5 GB) +
clones/sidecars-fts/000.idx.db:

    apsw  median: 704 ms / chunk (mean 773, first 1594, warmup ~500)
    blob  median:  91 ms / chunk (mean 92, flat — no warmup effect)
    speedup:     7.7×

Real-world: ~2.6 s saved per fresh 4-chunk query. For cache-miss
flows that already pay 5-15 s on the LLM call this is real but not
transformative. The big win for blobs is cache HITS that don't go
to LLM (returns drop from ~100 ms via cached chunks to sub-50 ms
via blobs) and bulk bench runs (400 fetches = 4 min vs 30 s).
Interactive single-question flow with LLM in the loop is fine on
the apsw path; blobs stay as future optimization, not blocker.

Also archives bench/three_way_results/*.jsonl (3 runs across the
#000072 Phase 1 progression) + bench/slim_fts_parity_results/ so
the journey from "cloud diverges from local" through "cloud matches
local 5/5" is on disk for the design-log record.
2026-05-31 15:44:55 -04:00
..
2026-05-31T13-44-36Z.jsonl bench: chunk_fetch_speed (apsw vs blob GET) + archive session bench results 2026-05-31 15:44:55 -04:00
2026-05-31T13-49-17Z.jsonl bench: chunk_fetch_speed (apsw vs blob GET) + archive session bench results 2026-05-31 15:44:55 -04:00