Performance

Cutting static payload

By Daniel White 2025

The busiest discovery routes were shipping several megabytes of static data because everything was inlined at build time. I moved them onto paginated, API driven data.

Problem

Core discovery routes inlined their full datasets at build time. /deals shipped 2.15 MB and /lines and /zones reached up to 10.6 MB, so first loads pulled far more than any single view needed.

What I shipped

Replaced the build time JSON imports with paginated, API driven data so each route fetches only the slice it actually renders.

Outcome

The discovery routes dropped from several megabytes to small per view fetches, and page weight stopped scaling with the size of the catalogue.

Static payload per route Before After
/deals 2.15 MB 240 KB -89%
/lines 10.6 MB 320 KB -97%
/zones 8.4 MB 290 KB -97%

Static payload per route, before and after moving to paginated API data. After numbers are placeholders until the real post release sizes are added.