Stop prefetching a megabyte per page, and stop calling the backend for free

Performancekamo-marketing
Ya
19 Agosti 2026, 15:19 UTC
Mwandishi
Kamo
Ahadi ya
d3de447

Two costs that were paid on every page, both found by following the reporter's own hunch about i18n and needless backend calls. PREFETCH VOLUME — a regression from 4fae924. Before the routes prerendered, a <Link> prefetch returned 220 empty bytes, so prefetching cost nothing. Now each one returns a real ~37 KB payload, and pages carry 73 internal links on average (194 on site-map). The shared footer alone contributes 29 of them on EVERY page: legal and company links nobody navigates by, each fetching and flight-parsing a full page payload on the same main thread that has just rendered the page actually asked for. Roughly a megabyte per page. prefetch={false} on the footer and on the bulk lists (site-map, the **************** hubs, blog, related content); the primary navigation keeps prefetching, which is where intent is. UNCACHED BACKEND CALLS — PreviewBanner lives in the shared layout, so its /api/changelog/today fetch fired on every single page load, and the route used `cache: "no-store"`: a live round trip to SecurityService, per visitor per page, for a count of today's changelog entries. Same pattern in /api/changelog and /api/changelog/stats. All three now revalidate at 60s, so the fleet sees at most one backend call a minute. DynamicMetaLoader was likewise re-fetching theme config cross-origin with no-store on every load to read a site name and an icon path; it uses the browser cache now. On i18n specifically, which was the other suspicion: measured, and it is no longer the bulk. Of a 37.7 KB prefetch payload the messages account for ~8.9 KB total (nav 1100 B, footer 2209 B, common 733 B, about 4134 B, and three smaller ones) — the per-route scoping in 013faf1 did its job. The remaining ~29 KB is the page's own serialized tree. Also extends the ?perf=1 probe to POST each sample to /api/perf-probe, so the timings land in the pod log and can be read with kubectl rather than transcribed out of the browser. Both are temporary and come out together.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei