Go straight to the answers
Vega SEO Talks

What is the mechanism by which total JavaScript payload size affects INP even when the initial page load appears fast and LCP is within the good threshold?

Answered 3-minute answer rooted in 3 pages

LCP stops measuring once the largest element paints; INP keeps measuring every interaction for the rest of the visit. A large JavaScript payload can finish its visible work early, so the hero renders and LCP passes, while the rest of the script is still being parsed, compiled, executed or hydrated. Any click or tap that lands during that work waits in the queue, which web.dev calls input delay. And the handlers a large application attaches can themselves run long. Both show up in INP and neither shows up in LCP.

Two metrics, two windows

Largest Contentful Paint Interaction to Next Paint
When it is measured Until the largest element in the viewport paints Across every click, tap and key press during the visit
What JavaScript affects Only the script that blocks or delays the LCP element All script that occupies the main thread when an interaction happens, plus the handlers themselves
Good threshold at the 75th percentile 2.5 seconds or less 200 milliseconds or less

A page can pass the first row cleanly. If its LCP element is server-rendered text or an image in the HTML, it does not wait for the bundle at all. The bundle’s cost lands later.

How payload turns into INP

web.dev’s INP article splits each interaction into input delay, processing duration and presentation delay. A large payload feeds the first two.

Input delay from work that is still running. After LCP, the browser may still be evaluating scripts, running framework hydration or executing third-party code. web.dev’s long tasks guide defines any task over 50 milliseconds as a long task and notes that a long task “will be measured as a poor Interaction to Next Paint (INP)” when it delays a response. An interaction that arrives during a 300-millisecond task waits for it to end.

Processing duration from heavy handlers. A large application can attach handlers that do a lot per interaction: updating application state, re-rendering components, recalculating derived data. The size of the payload is not the cost itself, but more code paths running on each interaction add to processing duration.

Presentation delay from the rendering the handler triggers. If a handler changes many elements, the browser has more style, layout and paint work before the next frame. This is where DOM size enters, which is a separate cause covered in its own guide.

Why the page “feels fast” in the lab

A lab load with no interactions does not produce an INP value. The first screen appears quickly, the score looks good, and the cost of the remaining script is invisible until a real visitor taps something while it runs. Field data captures that tap.

Reducing payload-driven INP

  1. Ship less JavaScript on the first view. Split code so that what is not needed for the first screen loads when it is needed.
  2. Break up long startup tasks. Hydration and initialization that run as one long task can be split so the main thread can respond between pieces. The long tasks guide covers yielding with setTimeout() and similar techniques.
  3. Defer non-essential third-party code. Tag managers and widgets that run during the first seconds compete with the visitor’s first interactions.
  4. Keep handlers short. web.dev’s INP optimization guide advises yielding to the main thread often and doing the minimum needed to update what the user sees in the handler, deferring the rest.
  5. Measure INP from real visits with attribution. Find which interactions are slow and whether their time is in input delay, processing or presentation. A slow input delay points at startup work; a slow processing duration points at the handler.

LCP tells you the page appeared quickly. INP tells you whether it responded quickly, and the JavaScript that does not delay the first paint can still decide the second answer.

Answers that share these roots

  1. How should large single-page applications restructure event handlers to reduce INP without sacrificing interactivity on complex filtering interfaces? shares 3 pages
  2. Why can replacing synchronous JavaScript with requestAnimationFrame callbacks sometimes increase INP rather than decrease it? shares 2 pages
  3. Why do sites that strictly enforce a 200KB JavaScript budget sometimes still fail INP when they rely heavily on CSS animations and complex DOM trees? shares 2 pages
  4. How does Interaction to Next Paint differ mechanistically from First Input Delay in what it captures about main-thread responsiveness? shares 1 page
  5. How do third-party scripts affect Core Web Vitals when they load asynchronously but still compete for main-thread execution time during user interactions? shares 1 page
  6. What diagnostic approach should you use when INP scores are poor at the 75th percentile but good at the median, indicating a long-tail interaction problem? shares 1 page

Replies to this answer

Leave a Reply

Your email address will not be published. Required fields are marked *