Search Atlas runs your marketing across every channel and fixes what breaks while you sleep

Core Web Vitals INP: Interaction to Next Paint Optimization & Long-Task Architecture

Manick Bhan, Founder CEO/CTOTechnical SEOPublished November 13, 202612 min read

See where AI answers cite your brand

  • 7 days free
  • $0 today
  • Full access

Quick answer

In brief

Learn Interaction to Next Paint (INP) mechanics, Chromium long-task thresholds, and main-thread scheduling using scheduler.yield and requestAnimationFrame.

Interaction to Next Paint (INP) is a stable Core Web Vitals metric that quantifies user interface responsiveness across the full lifecycle of a webpage. The metric evaluates the latency of tap, click, and keyboard interactions by recording the duration between physical user input and subsequent visual frame presentation on screen. Google officially promoted INP to replace First Input Delay (FID) on March 12, 2024, establishing a 200-millisecond threshold at the 75th percentile of real-world page visits.

Key takeaways

  • Interaction to Next Paint evaluates page responsiveness by measuring the 98th percentile of all interaction latencies throughout the entire user session.
  • Total interaction latency consists of three distinct phases: input delay, processing duration, and presentation delay.
  • Main-thread tasks exceeding 50 milliseconds qualify as long tasks that block the Chromium event loop from dispatching user inputs.
  • Cooperative multitasking with scheduler.yield() breaks monolithic JavaScript execution into discrete sub-50ms tasks without relinquishing thread priority.
  • Offloading heavy state calculations to Web Workers while reserving requestAnimationFrame() for visual acknowledgement keeps interactions below the 200ms threshold.

TL;DR

What is Interaction to Next Paint (INP)?

Interaction to Next Paint is the Core Web Vitals metric that assesses a page's overall responsiveness by measuring the latency of all qualified user interactions. A passing score requires an INP value of 200 milliseconds or less at the 75th percentile.

How does INP differ from FID?

First Input Delay (FID) measured only the input delay of the very first user interaction during page load. INP measures the complete latency (input delay, processing time, and visual presentation delay) of all interactions across the full page visit.

Which user interactions count toward INP?

INP monitors discrete interactions including mouse clicks, touch taps on mobile screens, and keypresses. Hovering and scrolling actions do not factor into INP calculations.

How do engineers fix high INP scores?

Engineers reduce INP by eliminating main-thread long tasks, yielding execution via scheduler.yield(), breaking up heavy event listeners, and deferring non-essential script execution.

Core Web Vitals Telemetry Studio

Interaction to Next Paint (INP) Simulator

Model input delay, processing duration, and presentation delay across user interactions. Profile main-thread blocking tasks exceeding 50ms and test cooperative yielding.

Calculated INP
335 ms
Needs Improvement (Threshold: 200ms)

User triggers a multi-facet e-commerce catalog filter modal.

Main thread executes long synchronous loops without yielding. User inputs queue up behind blocking scripts.

Interaction Latency Parameters:
95 ms
Background script contention & queue wait.
175 ms
Event callback execution & DOM calculations.
65 ms
Style recalculation, reflow, composite, paint.
Status: Failing Google 75th percentile threshold
Phase Latency Breakdown:Total: 335 ms
Input delay (95 ms)Processing duration (175 ms)Presentation delay (65 ms)
Discrete Main-Thread Tasks and Long-Task Profile:
Background main thread task
95 msLong Task (45ms blocking)
Synchronous event listener execution
175 msLong Task (125ms blocking)
Style recalculation and paint
65 msLong Task (15ms blocking)

1. Interaction to Next Paint: The Core Web Vital for Responsiveness

Interaction to Next Paint is a web performance standard that measures comprehensive client-side interface responsiveness. The metric tracks the elapsed time between user input dispatch and the next visual frame rendered by the browser compositor. A site achieves a good rating when 75% of page interactions complete within 200 milliseconds according to real-user measurement standards.

flowchart LR
    UserInput["User Physical Input<br/>(Click, Tap, Keypress)"] --> Phase1["Phase 1: Input Delay<br/>(Task Queue Wait)"]
    Phase1 --> Phase2["Phase 2: Processing Duration<br/>(JS Event Callbacks)"]
    Phase2 --> Phase3["Phase 3: Presentation Delay<br/>(Style, Layout, Paint)"]
    Phase3 --> ScreenPaint["Next Frame Rendered<br/>(Visual Display)"]

Chromium measures interaction response times through the Event Timing API across all user actions on the page. Unlike synthetic page speed benchmarks, INP records real-user experiences within the Chrome User Experience Report (CrUX) dataset. If a webpage delays visual updates after a user taps a filter or navigation item, the browser logs a high latency value for that session.

Site owners evaluate INP alongside other foundational benchmarks covered in our guide on what Core Web Vitals measure. Maintaining fast response times prevents interaction abandonment and preserves organic ranking equity across mobile search results.

Chromium event timing API and interaction lifecycles

The Chromium Event Timing API is a browser specification that instruments input latency timestamps for interactive elements. The API operates by registering hardware timestamps when the operating system receives a pointer or key event, capturing subsequent microtask dispatch and frame presentation times. The recorded duration encompasses the total interval until the browser compositor submits the updated frame buffer to the operating system display pipeline.

// PerformanceObserver snippet measuring interaction latency
const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    if (entry.interactionId) {
      const inputDelay = entry.processingStart - entry.startTime;
      const processingDuration = entry.processingEnd - entry.processingStart;
      const presentationDelay = entry.duration - (entry.processingEnd - entry.startTime);
 
      console.log(`Interaction ID: ${entry.interactionId}`);
      console.log(`Total Latency: ${entry.duration}ms`);
      console.log(`Input Delay: ${inputDelay}ms`);
      console.log(`Processing: ${processingDuration}ms`);
      console.log(`Presentation Delay: ${presentationDelay}ms`);
    }
  }
});
 
observer.observe({ type: 'event', buffered: true, durationThreshold: 16 });

The browser assigns a unique interaction ID to associated pointer and key events that share a single user gesture. For example, a mouse click triggers pointerdown, mousedown, and click events in sequence. The Event Timing API consolidates these events into a single interaction unit, reporting the maximum latency observed across the group.

If a session includes fewer than 50 interactions, INP reports the worst overall interaction latency recorded during the visit. In sessions containing 50 or more interactions, Chromium discards one high outlier for every 50 interactions to mitigate anomalous hardware spikes. The 98th percentile metric reflects realistic user responsiveness across dynamic web applications.

Differences between First Input Delay and Interaction to Next Paint

First Input Delay is a legacy Core Web Vitals metric that quantified initial main-thread availability during page bootstrap. First Input Delay operated by capturing the delay between a user's first input and the moment event callbacks began processing, ignoring callback runtime and visual display updates. The metric failed to reflect page responsiveness because pages with fast bootstrap times could freeze during subsequent checkout, search, or filtering interactions.

Architectural DimensionFirst Input Delay (FID)Interaction to Next Paint (INP)Engineering Significance
Observation WindowFirst interaction only (Page load).All interactions across session lifecycle.Full user session is accountable for performance.
Measured PhasesInput delay only.Input delay, processing duration, and presentation delay.Measures end-to-end user perceived visual response.
Target Threshold100 ms or less (75th percentile).200 ms or less (75th percentile).Stringent standard requiring coordinated main-thread scheduling.
Monitored InputsClicks, taps, keypresses.Clicks, taps, keypresses.Excludes scroll and hover gestures in both standards.
Outlier HandlingAbsolute single observation.98th percentile (Outlier filtering for high interaction volume).Mitigates statistical noise from transient device stutter.

INP provides an accurate reflection of user satisfaction because modern websites rely heavily on client-side rendering and hydration. When reviewing our analysis on JavaScript SEO rendering pipelines, interface responsiveness depends on how quickly client scripts yield control back to the layout engine.

2. The Three Phases of User Interaction Latency

User interaction latency is the complete time required for a user's action to produce visual feedback on screen. The lifecycle operates through three serial stages: input delay, processing duration, and presentation delay. The cumulative sum of these three phases determines the final millisecond score recorded by Chromium performance profilers.

sequenceDiagram
    autonumber
    actor User as User Input
    participant Main as Main Thread
    participant Queue as Task Queue
    participant Compositor as Compositor Thread
 
    User->>Queue: Physical tap / click registered
    Note over Queue,Main: Phase 1: Input Delay (Wait for running tasks)
    Queue->>Main: Dequeue event callback
    Note over Main: Phase 2: Processing Duration (Execute event handlers)
    Main->>Main: Mutate DOM nodes & calculate state
    Note over Main,Compositor: Phase 3: Presentation Delay (Style, layout, paint)
    Main->>Compositor: Submit display frame buffer
    Compositor-->>User: Screen presents updated visual pixels

Engineers profile each phase independently to isolate performance bottlenecks. Input delay indicates main-thread congestion prior to the event. Processing duration highlights inefficient script execution inside callback functions. Presentation delay reveals complex DOM reflows and compositor synchronization hold-ups.

Input delay: Event queue contention and main-thread blocking

Input delay is the duration between the physical arrival of an input event and the invocation of its associated event handler. Input delay occurs when long background tasks, third-party trackers, or hydration scripts occupy the main thread when a user attempts to interact. The target budget for input delay is under 50 milliseconds to keep cumulative INP within standard tolerances.

Heavy resource loading during page bootstrap is a frequent cause of input delay spikes. When browsers execute large JavaScript bundles, the single main thread cannot pause execution mid-script to process incoming touch gestures. The incoming event waits in the browser task queue until prior tasks finish execution.

Third-party marketing pixels and tag management containers also cause severe input delay. Scripts evaluating analytics or session replays trigger recurring CPU bursts, starving user events of processing cycles.

Processing duration: JavaScript callback execution and DOM thrashing

Processing duration is the total wall-clock time spent executing JavaScript callback functions associated with a user interaction. The phase operates by running developer-defined event listeners, synchronous framework state updates, and subsequent DOM manipulation routines. The recommended allowance for processing duration is below 100 milliseconds to avoid starving the rendering pipeline.

// PROBLEM: Synchronous DOM thrashing causing long processing duration
button.addEventListener('click', () => {
  const container = document.getElementById('product-list');
  
  // Reading layout properties forces synchronous reflow
  const initialWidth = container.offsetWidth; 
  container.style.width = `${initialWidth + 20}px`;
  
  // Interleaved read/write triggers repeated layout recalculations
  const updatedHeight = container.offsetHeight; 
  container.style.height = `${updatedHeight + 10}px`;
});

DOM thrashing occurs when JavaScript interleaves read operations with write operations on the document tree. When an event listener modifies an element style and immediately reads layout dimensions, the browser halts execution to recalculate styles and layout. Multiple layout flushes within a single click handler expand processing duration well beyond acceptable limits.

In addition to DOM thrashing, inefficient data transformation algorithms degrade interaction speed. Parsing large JSON payloads, running unmemoized array sorts, or iterating over thousands of objects in the main thread prevents prompt execution completion.

Presentation delay: Style recalculation, compositor threads, and frame dispatch

Presentation delay is the duration required for the browser to calculate layout changes, paint pixels, and submit the resulting frame to the GPU. This final phase operates through style recalculations, layout tree generation, layer composition, and compositor thread rasterization. The optimal threshold for presentation delay is below 50 milliseconds to ensure smooth visual updates.

Deeply nested DOM hierarchies increase the computational cost of style recalculation. When an interaction alters class names near the root of the document tree, the browser evaluates CSS selectors across thousands of descendant nodes. Simplifying DOM depth directly reduces the overhead of layout calculations.

CSS transitions using non-composited properties also inflate presentation delay. Altering properties like top, left, width, or margin requires layout recalculation on the main thread. In contrast, properties such as transform and opacity bypass the main thread and execute directly on the GPU compositor thread.

3. Main-Thread Long-Task Architecture and Yielding Mechanics

Long-task architecture is the scheduling framework governing task duration and thread utilization within modern browser engines. The architecture operates by decomposing long execution blocks into short tasks to maintain a responsive event loop. Chromium defines a long task as any uninterrupted script execution exceeding 50 milliseconds.

flowchart TD
    subgraph Monolithic["Monolithic Execution"]
        T1["Task 1: 180ms continuous loop (Blocks UI for 130ms)"]
    end
 
    subgraph Cooperative["Cooperative Task Slicing"]
        Y1["Task Slice 1: 35ms"] --> S1["Yield to Event Loop"]
        S1 --> Y2["Task Slice 2: 40ms"]
        Y2 --> S2["Yield to Event Loop"]
        S2 --> Y3["Task Slice 3: 35ms"]
    end

Controlling task length prevents the browser main thread from locking up during resource intensive operations. When scripts execute cooperative yielding, the browser services user input events between task slices. This architecture converts erratic interaction delays into consistent sub-50ms task execution.

The 50-millisecond long-task threshold and blocking time

The 50-millisecond threshold is the standard runtime limit used to classify browser main-thread tasks as responsive or blocking. The standard operates on the human perception threshold of 100 milliseconds for instantaneous visual feedback, providing a 50ms buffer for rendering after task completion. The blocking time of any task is defined mathematically as the duration exceeding 50 milliseconds:

Blocking Time = max(0, Task Duration - 50 ms)

A task running for 160 milliseconds generates 110 milliseconds of blocking time. During those 110 milliseconds, the browser cannot accept user keystrokes, respond to mouse clicks, or dispatch animations. If a user interacts while this task occupies the thread, the interaction registers an immediate 110ms input delay penalty.

Cumulative blocking time across multiple tasks compounds performance degradation. Minimizing individual task durations below 50 milliseconds eliminates blocking time, enabling the browser to process incoming events with near-zero queue delays.

Cooperative multitasking with scheduler.yield()

Cooperative multitasking is an execution pattern where long-running JavaScript code voluntarily relinquishes the main thread back to the browser event loop. The mechanism operates through the modern scheduler.yield() API, which pauses execution, yields control to process higher-priority rendering or input tasks, and immediately resumes the remaining work. The scheduling priority of scheduler.yield() retains execution order ahead of standard timer queues.

// MODERN COOPERATIVE SCHEDULING WITH scheduler.yield()
async function processLargeDataset(items) {
  const BATCH_SIZE = 50;
 
  for (let i = 0; i < items.length; i += BATCH_SIZE) {
    const chunk = items.slice(i, i + BATCH_SIZE);
    processChunk(chunk);
 
    // Yield control to the browser event loop between batches
    if ('scheduler' in window && 'yield' in window.scheduler) {
      await window.scheduler.yield();
    } else {
      // Fallback for legacy runtimes using macrotask queue
      await new Promise((resolve) => setTimeout(resolve, 0));
    }
  }
}

Legacy yielding techniques relied on setTimeout(fn, 0) to post tasks to the macrotask queue. However, setTimeout yields control to the back of the task queue and introduces minimum timer throttling of up to 4 milliseconds. Furthermore, background tasks and third-party scripts can jump ahead of delayed timer callbacks.

The modern scheduler.yield() method yields specifically to high-priority browser tasks without losing its position relative to general tasks. If an input event arrives during execution, Chromium processes the input event and paint frame before returning to the next yielded slice.

Frame coordination using requestAnimationFrame and Web Workers

Frame coordination is the software pattern of separating visual interface updates from heavy computational logic. The pattern operates by scheduling visual acknowledgements via requestAnimationFrame() while delegating heavy data parsing to background Web Workers. This division ensures the main thread updates the display within 16 milliseconds of a user action.

// Offload data processing to a dedicated background worker
const worker = new Worker('/workers/catalog-processor.js');
 
button.addEventListener('click', (event) => {
  // Step 1: Immediate visual feedback on the main thread
  requestAnimationFrame(() => {
    button.classList.add('loading-state');
    button.setAttribute('aria-busy', 'true');
  });
 
  // Step 2: Dispatch heavy computation off the main thread
  worker.postMessage({
    type: 'FILTER_CATALOG',
    criteria: { category: 'electronics', inStock: true }
  });
});
 
// Step 3: Handle worker response when computation completes
worker.onmessage = (event) => {
  const { filteredItems } = event.data;
  requestAnimationFrame(() => {
    renderCatalogView(filteredItems);
    button.classList.remove('loading-state');
    button.removeAttribute('aria-busy');
  });
};

Web Workers run on separate operating system threads and have no access to the document object model. By running intensive calculations in worker threads, the main thread remains idle and available to handle user inputs.

Providing immediate visual feedback through requestAnimationFrame() satisfies the interaction lifecycle before heavy rendering starts. Displaying a loading spinner or pressed button state acknowledges the user touch, keeping initial presentation latency well within limits.

4. CrUX Real-User Telemetry and Lab Performance Profiling

Real-user telemetry is the continuous measurement of website performance recorded across actual user visits. Telemetry operates by capturing field data through Chromium browsers and aggregating metric percentiles into the public Chrome User Experience Report (CrUX). Google algorithms assess Core Web Vitals compliance based exclusively on field data rather than synthetic lab benchmarks.

Evaluating real-user performance requires combining field telemetry with local lab profiling tools. Field monitoring reveals real-world distribution curves across diverse mobile devices and cellular networks. Lab audits allow developers to isolate and reproduce main-thread bottlenecks under controlled CPU throttling conditions.

Field data collection through the Chrome User Experience Report

The Chrome User Experience Report is a public dataset of real-world user experience metrics collected across millions of websites. CrUX operates by logging anonymous performance metrics from opted-in Chrome users on desktop and mobile platforms over a 28-day rolling window. The compliance threshold mandates that at least 75% of page views meet the 200ms standard to receive a good assessment.

INP Distribution Curve (CrUX Assessment):
[=========== Good: <= 200ms ===========][== Needs Improvement: 201-500ms ==][== Poor: > 500ms ==]
^ 75th Percentile Evaluation Point

Field telemetry accounts for real-world environmental variables that synthetic tests cannot replicate. Variations in mobile device CPU speed, operating system scheduling, memory limits, and physical touchscreen responsiveness all influence real-world INP scores. A page that tests cleanly on high-performance desktop hardware may fail field evaluation when accessed on budget mobile devices.

Teams monitor field metrics using Google Search Console Core Web Vitals reports and the Search Atlas Site Auditor. Integrating field telemetry into our technical SEO audit methodology ensures that interaction bottlenecks receive prioritized engineering remediation.

Total Blocking Time correlation and synthetic profiling

Total Blocking Time (TBT) is a synthetic lab metric that measures the total duration between First Contentful Paint and Time to Interactive where the main thread was blocked by tasks exceeding 50ms. TBT serves as the primary lab proxy for predicting field INP performance during development and automated CI/CD testing. A reduction in lab TBT reliably correlates with improved field INP scores across production environments.

TBT = ∑ max(0, Duration(T_i) - 50 ms)

Engineers use the Chrome DevTools Performance panel to record and profile interactions locally. Applying 4x or 6x CPU throttling during recording simulates mobile processor limitations, exposing un-yielded long tasks. The Interactions track in DevTools displays exact breakdowns for input delay, processing duration, and presentation delay for every user event.

5. Technical SEO Impact and Search Architecture Considerations

Technical search architecture is the engineering configuration of web assets to maximize search engine indexation efficiency and user satisfaction. The discipline operates by coordinating page load speed, rendering pipelines, and Core Web Vitals to satisfy algorithmic ranking criteria. Since March 2024, INP operates as a formal ranking signal within Google's page experience evaluation systems.

Failing Core Web Vitals thresholds harms organic visibility across competitive commercial keywords. When search engines observe poor interaction metrics, user engagement signals such as bounce rate and conversion frequency deteriorate. Maintaining high performance protects organic traffic and enterprise customer acquisition.

Ranking signals, mobile search parity, and Google Search Console monitoring

Google page experience signals incorporate Core Web Vitals as ranking criteria across both mobile and desktop search indexes. Mobile-first indexing evaluates mobile field performance as the primary baseline for domain quality assessments. Google Search Console categorizes URLs with INP scores between 201ms and 500ms as Needs Improvement, while scores above 500ms trigger Poor URL status.

Google Search Console Classification Rules:
- Good: INP <= 200 ms (Green status, full ranking eligibility)
- Needs Improvement: 201 ms <= INP <= 500 ms (Amber status, remediation required)
- Poor: INP > 500 ms (Red status, negative user experience impact)

Addressing clustered URL issues in Google Search Console restores ranking potential across entire page templates. E-commerce product categories and faceted search pages frequently share identical template code. Correcting a single event handling flaw resolves INP issues across tens of thousands of indexed URLs simultaneously.

Aligning Core Web Vitals performance with broader technical initiatives enhances overall site health. Pairing INP remediation with layout stability guidelines detailed in our guide to Cumulative Layout Shift delivers a stable, responsive user experience across all visitor devices.

Third-party tag governance and script execution budgets

Script execution budgeting is an engineering discipline that establishes strict CPU limits for first-party and third-party code. The practice operates by auditing tag management systems, restricting third-party execution windows, and removing redundant analytics libraries. Unrestricted third-party tags represent the most common cause of interaction responsiveness failures on commercial enterprise websites.

Recommended Client-Side Execution Budgets:
- First-Party Application Code: <= 150 ms total main-thread CPU budget
- Third-Party Marketing Tags: <= 50 ms total main-thread CPU budget
- Maximum Individual Task Length: <= 50 ms (Cooperative yield required)
- Total Page Script Weight: <= 250 KB compressed (brotli / gzip)

Tag managers should never execute synchronous code during user interactions. Event tracking pixels should process asynchronously using navigator.sendBeacon() or background fetch requests. This architecture avoids holding up the main thread when users tap checkout or navigation elements.

Enforcing architectural budgets during code review and deployment cycles safeguards field performance. When engineering teams govern script execution, pages maintain clean event loops, low interaction latency, and sustained Core Web Vitals compliance.

Picture of Manick Bhan
Manick Bhan

Founder CEO/CTO

Manick Bhan is a 3x INC 5000 Founder CEO/CTO of Search Atlas which is an AI SEO automation platform used by thousands of brands and agencies.