57% of an app's traffic hit one endpoint — cutting a 27MB response to a few KB
kashifmanzoor · x · 2026-12-06
The author traced 57% of a custom app's outbound traffic to a single endpoint: an order-list API that returned every order the company ever had, plus customer details and message threads — 7–31MB per call, uncompressed, for large companies.
Worse: 5 screens called it, and none needed all of it. The new-order form downloaded 27MB just to compute "next order number = last + 1".
The fix was deliberately boring (and non-AI, which is the point): the form requests only the number (6 bytes), the calendar asks for one month, and reports request only figures for their date range. To guarantee no numbers changed, every report figure was recorded before and after — all identical, and old callers get the same response.
Result: 27MB dropped to under 4MB at worst, often a few KB — faster screens on phones, less server memory. Lesson: "return everything" is easy to write and costly to keep running.
More from coding & agent
- DeepMind open-sources formal-papers: Lean 4 machine-checked formalizations of research papers — anderssandberg · 2026-12-06
- New Floridi paper argues LLM capability and safety hinge on the agent harness, not the weights — rvp · 2026-12-06
- Open Artifacts: open-source local-first layer lets any coding agent build editable artifacts — vista8 · 2026-12-06
- Open Artifacts plugin turns a tweet into a narrated explainer video — dotey · 2026-12-06
- Dev builds all-in-one AI Media Composer generating video, music and vocals — wavefnx · 2026-12-06
- Developer's first Rust project: a cute terminal crab mascot named Kiki — aahiknsv · 2026-12-06