
Frontend Performance Engineering: The Guide
Core Web Vitals are an architectural input, not post-launch cleanup. Budget your JavaScript and hydration, know each rendering strategy's CWV profile, then verify in the field.
TL;DR: In 2026, the rendering strategy and the amount of JavaScript you ship shape frontend performance before any post-launch tuning begins, alongside asset decisions such as the LCP image. Core Web Vitals — LCP, INP, and CLS — should be inputs to architecture, with INP and its hydration cost as a major lever for interactive apps. This article gives you a JS-and-hydration budget approach, a per-rendering-strategy performance profile, and remediation priorities ordered by field data.
Performance starts with the rendering decision
A consequential performance decision on a project is made before any optimization work begins: the rendering strategy. Largest Contentful Paint, Interaction to Next Paint, and Cumulative Layout Shift outcomes are shaped by how the page is rendered and how much JavaScript reaches the client, alongside assets such as images and fonts, and treating Core Web Vitals as a post-launch cleanup is how teams end up tuning around an architecture that cannot hit the targets.
The metric that makes this concrete is interactivity. Interaction to Next Paint (INP) replaced First Input Delay as a Core Web Vital on March 12, 2024, and the change matters because FID only measured the input delay of the first interaction on a page, while INP observes the latency of all click, tap, and keyboard interactions throughout a user's visit to a page and reports the longest one, ignoring outliers — so a slow interaction later in the visit can count against the page even after a fast first tap. The other two vitals are defined alongside it in the Core Web Vitals reference (as of Nov 2026); this article assumes those definitions and stays on the part a frontend engineer controls — the JavaScript and hydration cost and the per-strategy profile — rather than re-explaining what each metric is.
The framing to adopt: Core Web Vitals are an architectural input. You decide the rendering mode knowing the CWV profile it implies, you set a JavaScript budget that the chosen mode can actually meet, and you verify in the field. A core discipline of performance engineering in 2026 is not writing a check the rendering strategy cannot cash. There is a separate, related question of how these same signals affect whether AI answer engines retrieve and cite a page; that cascade is its own subject covered in the AI Search topic, and this article deliberately keeps scope to the engineering of the metrics themselves.
The JS and hydration budget
A useful artifact in a performance practice is a per-route JavaScript budget: a hard ceiling, in kilobytes of script delivered and executed, that a route is not allowed to exceed. A budget converts performance from an argument into a number, and a number can be a gate.
The budget matters most because of hydration. In a client-hydrated application, the server (or build) produces HTML, and then the client re-runs the component tree to attach event handlers and reconstruct state — and web.dev's rendering guide notes that this hydration work can have a significant negative impact on INP, because a server-rendered page cannot respond to input until the client-side scripts for its components have run and their event handlers are attached. A page can paint quickly and still feel broken, because the pixels arrived before the JavaScript that makes them respond finished executing. This is why a page can pass LCP and still fail INP, and why the budget has to target shipped-and-executed JavaScript specifically, not just transfer size.
Three rendering techniques attack this same hydration cost from different angles — partial hydration hydrates only some components, islands isolate and hydrate interactive regions independently, and resumability avoids re-running the tree at all by serializing state and resuming on the client. This topic covers each of those as its own subject; the performance-engineering point is that they are not separate features to admire but three implementations of one budget strategy: ship less JavaScript to the main thread during the interaction window. Whichever you choose, measure the right thing — the amount of JavaScript actually shipped per route and field INP from real users, not a single lab score, because lab numbers miss the device and network variance that determines whether the budget holds in production.
Code splitting and streaming
Two techniques do the heavy lifting once the budget exists: code splitting reduces how much JavaScript a route ships, and streaming improves how fast useful content appears.
Code splitting is the deliberate deferral of non-critical JavaScript so the initial route loads only what it needs. Route-level splitting ensures a visitor to one page does not download the code for every other page; component-level splitting defers heavy, below-the-fold, or interaction-triggered components until they are actually needed. web.dev's guidance on code splitting frames the goal precisely — send only the code the initial route needs and load the rest on demand — and in budget terms (see web.dev's performance budgets primer), splitting is one way a route stays under its ceiling without removing functionality.
Streaming server-side rendering attacks a different metric. Instead of building the entire page on the server and sending it in one response, streaming SSR flushes HTML progressively: the shell, and any content outside the slow sections, reaches the browser while slower data still resolves on the server. The effect is a faster first paint on data-heavy pages: streaming lowers TTFB and FCP because the server sends the shell as soon as it is ready and the browser paints it while the slow section still resolves. LCP improves too when the LCP element renders in the shell; an LCP element inside a section that streams in later cannot paint until that section arrives. None of this changes the underlying per-request cost model. The discipline that makes streaming pay off is avoiding request waterfalls — sequential data fetches that each wait for the previous one. Colocating data fetching with the server components that need it does not by itself make requests parallel: independent requests have to start at the same time (for example, in sibling streamed sections or with Promise.all), and requests that depend on each other still run in sequence. Splitting keeps the budget; streaming spends what is left where the user notices it most.
Per-rendering-strategy performance profile
Because rendering shapes performance, each strategy has a characteristic Core Web Vitals profile and a specific lever the frontend controls. This table is the engineering deliverable — read each row as the typical starting profile and the lever the frontend controls, not as a leaderboard.
| Rendering strategy | LCP profile | INP profile | CLS risk | Primary frontend lever |
|---|---|---|---|---|
| CSR (client-side) | Weak — useful paint waits on bundle | Risk grows with bundle and client rendering work | Higher during late client render | Code splitting and JS budget |
| SSR (per request) | Good, but TTFB-sensitive on slow data | Good after hydration; hydration is the cost | Low if layout is server-set | Reduce hydration; cache to cut TTFB |
| SSG (prebuilt static) | Strong — files on a CDN | Good; still pays hydration if interactive | Low — layout fixed at build | Trim per-page shipped JS |
| Streaming SSR | Strong if the LCP element is in the shell — progressive flush | Good; depends on hydration of streamed parts | Manage shifts as chunks arrive | Boundary design; avoid waterfalls |
| Islands / resumable | Strong — minimal initial JS | Strong — little or no main-thread hydration | Low — static shell is stable | Keep islands small and few |
Two refinements keep this honest. The profiles are starting points, not guarantees: an SSG site that ships a large interactive bundle inherits CSR's INP problem despite a strong LCP, because the hydration cost does not care how the HTML was produced. And avoid absolute "fastest" claims — state the metric and the condition, since SSG wins time-to-first-byte for cacheable content while streaming SSR can feel faster on a data-dependent route. The table tells you where each strategy starts and which lever to pull; the budget tells you whether you actually stayed there.
Asset cost beyond JS
JavaScript and hydration are the framework-specific part of performance and the focus of this article, but they are not the whole LCP and CLS story. Images are frequently the actual LCP element, and web fonts can delay when a text LCP element renders; web.dev also lists images without dimensions and web fonts among the most common causes of poor CLS. Both have their own engineering discipline.
That discipline belongs to adjacent subjects, not this one. Responsive image strategy — correct sizing, formats, and the srcset and picture decisions — is covered in the responsive-UI material, and font loading behavior, including the swap and fallback choices that cause or prevent CLS, is covered in the web-compatibility material. The reason to draw the boundary explicitly is that conflating "make the site fast" into one undifferentiated checklist is how teams optimize JavaScript while an unsized hero image quietly owns their LCP. The engineering move is to know which lever owns which metric: for a content page, the LCP element is often an image and the fix is an asset decision; for an interactive app, the problem can be INP, and then the fix is a JavaScript and hydration decision. Keep this article's work on the JS, hydration, and INP side, and route the asset work to where it is owned rather than re-deriving it here.
Remediation priorities
Performance work fails when it optimizes by intuition before measurement, or fixes the wrong route. Run it in this order:
- Instrument field Core Web Vitals (real-user monitoring) before changing anything — collect LCP, INP, and CLS from actual visitors, segmented by route and device.
- Identify the worst route by its dominant failing metric in the field data, not by lab scores or assumptions about which page "feels slow."
- If the dominant failure is INP, attack hydration first: measure shipped-and-executed JavaScript on that route, then code-split or move interactivity to islands or a resumable model.
- If the dominant failure is LCP and the element is an image, or a text block waiting on a web font, route that work to the asset discipline rather than tuning JavaScript that is not the bottleneck.
- Re-measure in the field after each change — confirm the targeted metric moved for real users before claiming the fix.
- Make the per-route JavaScript budget a CI gate so a regression fails the build instead of being discovered later in field data.
Performance in 2026 is shaped early by the rendering choice and defended by a budget. Measure in the field, fix the dominant metric on the worst route first, and turn the budget into a gate — that loop does not depend on any one framework because it optimizes the cost, not the framework.