Bootstrap waterfall collapsed into a single cached query
ReleasedTomislav Babic
On the Legal Center, the first request you make to any page used to fire a small chain of dependent queries: fetch the project, then the page, then the related metadata, then the variants. Each one waited on the previous to know what to ask for. The result was a noticeable waterfall on cold loads.
We collapsed the whole sequence into a single query that returns the full payload your renderer needs, wrapped in SWR caching so subsequent navigations come back instantly from cache while a background refresh keeps things current.
The improvement is most visible on slow connections, where the waterfall used to cost you a handful of round trips. You should feel the difference in the first-page-paint metric immediately.
May 4, 2026
Activity feed
No comments yet, be the first to comment!