Core Web Vitals INP Debugger & Main Thread Auditor

Parse specific frontend layout JavaScript blocks to flag blocking event handlers that trigger bad Interaction to Next Paint scores.

Execution Payload

Paste pure JavaScript logic. Live Profiler: We will execute this code inside an isolated Blob Web Worker to measure exact hardware latency via performance.now().

Real Execution Time
0ms
Awaiting Web Worker...
Total INP (ms)
0ms
Input + Process + Render
CWV Status
GOOD
Sub-200ms latency
Main Thread Timeline Simulation Frame: 16.6ms
200ms (Needs Improv.)
500ms (Poor)
Input Delay (0ms)
HW Execution (0ms)
Render Delay (0ms)
Live Profiler: Your code is executed dynamically in an isolated Web Worker. We measure the exact execution duration (Hardware Execution) and simulate the OS Input Delay (~40ms) and Browser Rendering overhead (~16ms) to generate the Estimated INP score.

Run analysis to detect AST anti-patterns.
Long Animation Frames (LoAF) API: Chrome 123+ exposes the exact breakdown of long tasks. Based on your code, here is what the LoAF JSON trace would look like in production.
Animation Frame (duration) 0ms
blockingDuration 0ms
PerformanceObserverEntry entryType: "long-animation-frame"
{ "duration": 0, "renderStart": 0, "styleAndLayoutStart": 0, "firstUIEventTimestamp": 0, "blockingDuration": 0, "scripts": [] }
No structural fixes recommended yet.

Interaction to Next Paint (INP)

In March 2024, Google officially deprecated First Input Delay (FID) and replaced it with Interaction to Next Paint (INP) as a Core Web Vital metric. While FID only measured the hardware interrupt delay of the first click on page load, INP measures the complete end-to-end latency of all interactions across the entire lifecycle of the application.

If a user clicks a dropdown, INP measures the exact millisecond delta between the physical click and the moment the browser's GPU paints the open menu on the screen. If this timeline exceeds 200ms, your SEO score degrades. If it exceeds 500ms, your page receives a "Poor" ranking penalty, severely impacting visibility on Google Search.

The LoAF (Long Animation Frames) API

Historically, developers relied on the "Long Tasks API" to debug INP. However, Long Tasks only measured JavaScript execution time; they completely ignored the rendering phase (CSS recalculations and layout). Since INP measures time to the "Next Paint", Long Tasks were fundamentally flawed for debugging.

Chrome 123+ introduced the Long Animation Frames (LoAF) API. A LoAF trace (which our tool simulates) encapsulates the entire frame, including script execution, style calculation, and render time. Crucially, the LoAF JSON payload includes an attribution array (scripts) that pinpoints the exact JavaScript function and file that caused the blockingDuration.

Reflow vs. Repaint: The Layout Thrashing Engine

Our AST Analyzer specifically detects "Layout Thrashing" by differentiating between Reflows and Repaints:

  • Reflow (Heavy): Triggered by reading geometry (e.g., element.offsetWidth or window.getComputedStyle()). The browser is forced to halt the Main Thread, recursively calculate the CSS Box Model for the entire DOM tree, and return the value. Interleaving reads and writes forces multiple synchronous Reflows per frame, instantly failing INP.
  • Repaint (Light): Triggered by changing composite-only properties (e.g., opacity or transform). These mutations bypass the CPU layout engine entirely and are handled directly by the GPU composite layer, causing zero impact on INP Processing Time.

V8 Engine JIT Compilation Delay

One of the most insidious causes of high Input Delay is V8's Just-In-Time (JIT) compiler. When you ship massive JavaScript bundles (e.g., sending an entire unused React library to the client), the V8 engine must parse, compile to bytecode, and optimize the script before it can execute your event handler.

If the user clicks a button exactly while V8 is compiling a third-party analytics payload on the Main Thread, the hardware interrupt is ignored until compilation finishes. This manifests as extreme Input Delay. Code splitting and deferring non-critical scripts is the only architectural fix.

scheduler.yield() Mechanics

To fix heavy processing blocks, developers traditionally used the setTimeout(fn, 0) hack to push remaining work to the back of the task queue. However, this allowed third-party scripts to steal the thread.

The modern Chromium Web API await scheduler.yield() acts as a surgical pause button. It tells V8: "Pause my execution, paint the visual UI update to the screen right now, and then resume my script at the very front of the queue, ahead of other pending tasks."

Frequently Asked Questions

Web Vitals

What is Interaction to Next Paint (INP)?
INP is a Core Web Vital metric that measures a page's overall responsiveness to user interactions. It assesses the latency of all click, tap, and keyboard interactions throughout a user's visit, replacing First Input Delay (FID).

Performance Analysis

How does the Main Thread Auditor identify bottlenecks?
The tool analyzes long tasks executing on the main thread during user interactions, breaking down JavaScript execution, style recalculations, and layout thrashing to pinpoint exactly which functions are causing interaction delays.

Performance Metrics

What is a good INP score according to Google?
For a good user experience, your page should have an INP of 200 milliseconds or less. Scores between 200ms and 500ms need improvement, while anything above 500ms is considered poor.

Rate Core Web Vitals INP Debugger & Main Thread Auditor

Help us improve by rating this tool.

4.7/5
273 reviews