You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Priority: P5 (latency, not cost) — Tier 2. Part of the 2026-07-11 DynamoDB query-cost review.
Problem
The storage layer has no BatchGetItem primitive. The dominant enrichment pattern is list_* (Query) followed by a sequential get_by_id per item — ~91 sites across 14 route files; routes/scim.rs:142 self-flags it ("a future piece could swap in a BatchGet"). Also comments.rs, chat.rs member hydration.
Fix
Add a batch_get primitive to storage and convert the N+1 enrichment loops.
Honest scope note
These are cross-partition single-item gets, so BatchGetItem costs ~the same RCU as N GetItems — this is a latency / round-trip win (p99), not a bill reduction. Prioritized below the Tier-1 cost items deliberately.
Activity
perf(storage): add UserRepo::get_by_ids batch primitive; use it in SC…
perf(storage): add UserRepo::get_by_ids batch primitive; use it in SC…
perf(api): collapse remaining get_by_id N+1 hydration loops (#38)
perf(api): collapse remaining get_by_id N+1 hydration loops (#38) (#95)