When Google officially retired First Input Delay (FID) in favor of Interaction to Next Paint (INP) as a Core Web Vital, thousands of websites that previously scored green suddenly plunged into the amber and red penalty tiers.
Why did this happen? Because FID only measured the initial input delay on a visitor’s very first click. It completely ignored what happened during the rest of the user journey.
INP, by contrast, measures the responsiveness of every single interaction across the entire page lifecycle—from hamburger menu toggles and filter dropdowns to form submissions and image galleries.
If a single button click triggers a 300ms JavaScript task that blocks the browser’s main thread, your entire domain fails Google’s page experience assessment.
Here is a senior engineer’s guide to diagnosing, profiling, and fixing INP regressions.
Understanding the INP Breakdown
An interaction consists of three distinct phases:
[User Action (Tap/Click/Keydown)]
│
├── 1. Input Delay: Waiting for previously queued background tasks to clear
├── 2. Processing Time: Executing the event listener JavaScript code
└── 3. Presentation Delay: Browser recalculating style, layout, and rendering next frame
│
[Visual Frame Painted on Screen]
To achieve a “Good” rating from Google, your 75th percentile of interactions across real-user field data (CrUX) must complete in under 200 milliseconds (at 2RUN, our engineering target is < 16 milliseconds).
The 3 Most Common Causes of Poor INP
1. Heavy Framework Hydration (The React/Next.js Trap)
When an SPA hydrates, it attaches event listeners while executing thousands of lines of virtual DOM comparison logic. If a user taps an accordion or navigation link while hydration is underway, the interaction is queued behind the massive hydration task, causing an input delay of 300ms to 800ms.
2. Third-Party Analytics & Heatmap Loops
Tracking scripts like Microsoft Clarity, FullStory, and un-optimized Google Tag Manager containers register DOM mutation observers and touch listeners. Every interaction triggers heavy serialized payload logging on the main thread, choking UI responsiveness.
3. Long Synchronous Tasks (> 50ms)
Event handlers that perform heavy mathematical calculations, sort large array datasets, or trigger synchronous layout recalculations (offsetHeight, getBoundingClientRect) force the main thread to freeze until the operation finishes.
3 Technical Strategies to Fix INP
Strategy 1: Yield to the Main Thread (scheduler.yield() / setTimeout)
Break monolithic JavaScript execution blocks into micro-tasks so the browser engine can paint intermediate visual feedback (like a loading spinner or active button state) before resuming heavy computation:
// Before: Blocks main thread for 180ms
function handleFilterClick(items) {
applyFilters(items); // 120ms
renderResults(); // 60ms
}
// After: Yields to browser renderer between tasks
async function handleFilterClick(items) {
// 1. Immediately provide visual feedback
setButtonActiveState();
// 2. Yield control back to browser to render the active state
if ('scheduler' in window && 'yield' in window.scheduler) {
await window.scheduler.yield();
} else {
await new Promise(resolve => setTimeout(resolve, 0));
}
// 3. Process remaining data
applyFilters(items);
renderResults();
}
Strategy 2: Offload CPU Tasks to Web Workers
For heavy client-side operations—such as filtering thousands of directory listings, computing mortgage amortizations, or parsing CSVs—move the computation off the main thread entirely using dedicated Web Workers.
Strategy 3: Migrate to Islands Architecture
The most effective way to eliminate INP penalties is to stop shipping monolithic JavaScript bundles. By using static site generators like Astro, pages ship zero JavaScript by default, leaving the main thread 100% idle and ready to respond to user interactions in less than 10 milliseconds.
Fix Your INP Regressions
Struggling with red or yellow INP flags in Google Search Console? Request a deep Core Web Vitals audit from 2RUN. We profile your main-thread bottlenecks and refactor your frontend code for sub-second paint times and instant interactivity.
Looking to Implement This Architecture?
Whether you are an agency seeking an unbranded technical execution partner or an enterprise looking to overhaul Core Web Vitals, our senior engineers are available for new projects.