Engineering · April 2, 2026 · 6 min read
Cutting API Response Times by 40%
The instinct when an API is slow is to reach for caching first. Usually that's the wrong first move. The refactor that actually delivered a 40% improvement here started with query-level profiling — most of the cost was in N+1 queries and unindexed lookups, not raw compute.
Once those were fixed, caching became a smaller, more targeted layer on top of an already-fast system, rather than a bandage over a slow one. The order matters: fix the underlying query pattern first, then cache what's left.
Once those were fixed, caching became a smaller, more targeted layer on top of an already-fast system, rather than a bandage over a slow one. The order matters: fix the underlying query pattern first, then cache what's left.