Browser & Frontend Runtime
Render pipeline: multiple-choice review
Six questions that cut across the whole pipeline. Each one mirrors a decision you make in a real jank investigation — not a stage to name, but a cost to predict and a fix to rank.
Confirm you can connect the six stages, the invalidation rules, compositor layers, layout thrash, and the production metrics — the synthesis the individual lessons built toward.
A scroll handler animates a list item by writing element.style.top each frame, and the page judders on a mid-range phone. A colleague says it is on the compositor, so it must be the GPU. Why are they wrong?
A page renders a 10,000-row feed. style + layout on first paint costs 1,200 ms. You want first paint fast without virtualising (no DOM rewrite). What is the highest-leverage single change?
You add will-change: transform to one card mid-feed for a smooth hover. DevTools Layer Borders now shows forty promoted boxes. Why, and what is the cost?
The main thread is blocked for 400 ms by a synchronous JSON.parse. A CSS transform animation keeps running at 60 fps; the team rAF-driven animation on the same element freezes. What is the mechanism?
Production RUM reports p75 INP of 340 ms while Lighthouse in the office scores 95. A click handler reads getBoundingClientRect() and then writes styles in a loop. How do you read this and where do you look first?
A touchmove listener is added without { passive: true } on a scroll container, and scroll fps collapses on mobile. What changed in the pipeline?
Across the unit the through-line is one decision chain: the property you change picks the stage you invalidate (transform = composite, color = paint, top/width = layout), dirty bits flow downstream, and containment or content-visibility caps the blast radius. Compositor layers are cheap to move but expensive to hold, the overlap rule promotes neighbours you never asked for, layout thrash comes from reading geometry after a write, and INP plus LoAF close the loop from production telemetry back to a specific stage. Predict the stage, rank the fix, then reach for the compositor.