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.

Original post →

More from coding & agent

coding & agent channel →