fleet-memory/hindsight-dev/benchmarks/perf
Nicolò Boschi 61bf428ba9
perf: fetch all recall chunks in a single query instead of batched while-loop (#475)
Replace the multi-round-trip while-loop in step 5.5 of recall_async with a
single WHERE chunk_id = ANY($1) query covering all candidate chunk IDs.
Token-budget accounting happens in Python after the single fetch.

Measured on a 97K-unit / 98M-link bank (budget=HIGH, include_chunks,
include_entities):
  p50:  1.209s → 0.611s  (−49%)
  mean: 1.534s → 0.772s  (−50%)
  p95:  3.366s → 2.316s  (−31%)

Also update recall_perf.py benchmark to use Budget.HIGH, include_chunks,
include_entities, and a realistic mixed fact_type distribution.
2026-03-03 14:52:48 +01:00
..
__init__.py fix: improve async batch retain with large payloads (#366) 2026-02-16 12:51:42 +01:00
recall_perf.py perf: fetch all recall chunks in a single query instead of batched while-loop (#475) 2026-03-03 14:52:48 +01:00
retain_perf.py fix: improve async batch retain with large payloads (#366) 2026-02-16 12:51:42 +01:00