Interaction to Next Paint (INP) measures how long users wait for the next frame after a click, tap, or key press. A page can load quickly and still feel slow when someone opens its filters or types in a search box. To improve INP, identify the slow action, record it in a browser trace, and fix the phase where the time goes.
Find the route and action behind poor INP
INP summarizes slow interactions across a visit. Google classifies field INP as good at 200 ms or less, needs improvement above 200 ms through 500 ms, and poor above 500 ms. Compare the 75th percentile of eligible visits, with mobile and desktop evaluated separately. Visits without qualifying interactions can have no INP value. See the web.dev INP definition and thresholds.
If Search Console flags slow mobile URLs, open the affected URL group and identify its shared template. For example, a set of category URLs might share a filter drawer, a sort menu, and a search box. The group gives you a place to look. You still need to identify the action that caused the delay. A new site or a route with little traffic may lack enough field data to appear in the report. See the Search Console Core Web Vitals report documentation.
For a local or preview build, use the attribution build of Google's web-vitals package to label candidate interactions as you exercise the page. Install it with npm install web-vitals and register the callback once in your browser entry point for the debugging session. Google's INP measurement codelab walks through this instrumentation.
import { onINP } from 'web-vitals/attribution';
onINP(({ value, attribution }) => {
const {
interactionTarget,
inputDelay,
processingDuration,
presentationDelay,
} = attribution;
console.table({
target: interactionTarget || '(unavailable)',
inpMs: value,
inputDelayMs: inputDelay,
processingMs: processingDuration,
presentationMs: presentationDelay,
});
}, { reportAllChanges: true });
This logs updates to the session's INP candidate, so use the DevTools Interactions view if you need to see every recorded action. For production monitoring, aggregate visit-level values and attach stable labels such as category and open-filters. Keep raw selectors and user-entered text out of the payload.
Debug Interaction to Next Paint in Chrome DevTools
- Open the public preview or local production build in Chrome. In DevTools, open Performance and choose a repeatable mobile viewport and CPU setting. Use a physical device as well when the slowdown depends on its hardware.
- Record while repeating one action. If the report suggests startup work is involved, record from reload and trigger the action as soon as the control appears. Also try it after the page settles so you can separate startup contention from work the action itself creates.
- Stop recording and select the event in the Interactions track. Check its input, processing, and presentation times, then inspect the Main thread around that event. Save the trace with the route, action, viewport, and throttle setting. See the Chrome DevTools Performance reference.
For example, a filter tap might take 320 ms, with 24 ms of input delay, 46 ms of event processing, and 250 ms of presentation delay. Start with the work between the callback and the frame. If the trace shows that opening the drawer mounts hundreds of offscreen options and triggers a large layout, try rendering a smaller initial set with a search control that can reach all options. Keep keyboard navigation and focus behavior intact, then record the same tap again.
Improve INP by fixing the slowest phase
- Input delay. Look just before the event for work already occupying the main thread, such as script initialization or parsing a large data response. Delay startup work the first action does not need. If your own work can run in pieces, split it so pending input can get a turn. The JavaScript long tasks guide shows how to inspect and split that work.
- Processing duration. Expand the event handler's call stack. If it rebuilds a large search index on every keystroke, move index creation outside that path or into a worker when the data and workload justify it. Update the visible input immediately so people can see what they typed while the results are being computed.
- Presentation delay. Inspect rendering and scripts that run before the frame. Reduce the amount of DOM updated for the first visible result and batch layout reads before writes where possible. If a click starts a request, show its pending state promptly and track the time until the result is usable separately. A quick first frame can coexist with a slow server response.
Google's INP optimization guide explains how to diagnose each phase and choose a fix.
Verify the fix before and after release
Repeat the original action several times with the same device, viewport, throttle, and cache state. Save before-and-after traces and compare the same phase. Also check that the interaction still completes the task. For the filter drawer, open it with the keyboard, choose an option, and confirm the results update. The mobile website testing guide covers the rest of that task on a small screen.
Record the action and setup in your website performance budget so someone else can reproduce it. Treat a local trace as evidence about that test session. After release, use field INP to see whether responsiveness improved across visits, and keep LCP and CLS in view if your fix also changes how the page loads or lays out.
Before launch, run Slop Audit on your public preview URL. When browser evidence is available, check Lab blocking-time proxy for exposed main-thread blocking during the bounded page run, alongside payload and runtime findings. Use that evidence to pick a route for a closer trace, then rescan after reducing startup work. Measure the specific slow interaction in DevTools and use real visits for field INP.