KamoCRM

Send the message catalogue by reference, not inside every document

Performancekamo-internal
Shipped
November 6, 2026 at 6:51 PM UTC
Author
Kamo
Commit
0916055

The root layout handed the whole catalogue to the client provider as a prop, so React inlined it into the RSC payload of every document: on /leads/calling 2.96 MB raw / 859 KB gzip, 99% of it the 2.59 MB catalogue, re-sent on every load and new tab (measured 2026-11-06, 5 loads: total 0.82-1.24 s from a desktop). Now the catalogue is its own content-addressed URL, **************** served with `immutable` caching: a deploy that changes a word changes the URL. The head preloads it beside the scripts and IntlErrorHandler waits for it before hydrating, so the first client render reads exactly the words the server rendered. The server-side render of client components reads the same catalogue from a process registry the layout fills, never from the document. Locale merge with the English fallback is unchanged (moved to i18n/messages.ts, shared by next-intl's request config and the route). /validate and /logout keep their inline two-key slice. A failed download retries twice, then renders keys rather than nothing.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing