Skip to content

Instantly share code, notes, and snippets.

@WebCloud
Created April 23, 2025 12:23
Show Gist options
  • Save WebCloud/d19486a2a78e3f2ee1cfd5adb7038d61 to your computer and use it in GitHub Desktop.
Save WebCloud/d19486a2a78e3f2ee1cfd5adb7038d61 to your computer and use it in GitHub Desktop.

Report: Most Common Causes of Poor Interaction to Next Paint (INP) Scores

This report outlines the most common causes of poor Interaction to Next Paint (INP) scores, drawing from recent research and analysis. INP is a crucial Core Web Vital that measures a website's responsiveness to user interactions, such as clicks and key presses. Understanding and addressing the causes of poor INP is essential for improving user experience and search engine rankings.

1. Executive Summary

Poor INP scores are primarily caused by excessive CPU processing, long tasks, and rendering delays. Optimizing JavaScript execution, minimizing main thread work, and efficiently handling third-party scripts are key strategies for improving INP. INP measures the time between user input and UI updates, so reducing any delays in this process is crucial. A good INP is less than 200ms, while over 500ms is considered poor [debugbear.com/docs/metrics/interaction-to-next-paint].

2. Understanding Interaction to Next Paint (INP)

Interaction to Next Paint (INP) measures the time between a user interaction (like a click or key press) and the next time the user sees a visual update on the page [debugbear.com/docs/metrics/interaction-to-next-paint]. It's a web performance metric that assesses user interface responsiveness [debugbear.com/docs/metrics/interaction-to-next-paint]. INP became one of the Core Web Vitals metrics in March 2024, directly impacting search performance [debugbear.com/docs/metrics/interaction-to-next-paint]. Unlike First Input Delay (FID), which only looks at the initial browser response, INP evaluates the entire response process, including script execution, content rendering, and visual changes on the screen [dev.to/logrocket/exploring-interaction-to-next-paint-a-new-core-web-vital-5efh].

INP is measured as the single longest interaction latency if there are less than 50 interactions on a page. If there are more interactions, INP is calculated as the 98th percentile of interaction latency [rumvision.com/blog/interaction-to-next-paint/].

3. Common Causes of Poor INP Scores

Based on the analysis of search results, the most frequent causes of poor INP scores are:

3.1. Excessive CPU Processing

  • Description: Excessive CPU processing on the page is a primary cause of poor INP. This can stem from inefficient website code or the impact of third-party scripts.
  • Evidence: Minimizing CPU processing, profiling website code, and reviewing third-party scripts are recommended [debugbear.com/docs/metrics/interaction-to-next-paint, web.dev/articles/optimize-inp].
  • Impact: High CPU usage delays the processing of user interactions, leading to increased INP.

3.2. Long Tasks

  • Description: Long tasks, especially those occurring just before the DOM Content Loaded event or within click event handlers, significantly contribute to input delay and, consequently, poor INP scores.
  • Evidence: Long Tasks directly impact INP [speedcurve.com/web-performance-guide/understanding-and-improving-interaction-to-next-paint/]. There's often a Long Task just before the DOM Content Loaded event [speedcurve.com/web-performance-guide/understanding-and-improving-interaction-to-next-paint/].
  • Impact: Long tasks block the main thread, preventing the browser from responding quickly to user interactions.

3.3. Rendering Delays

  • Description: Rendering delays, influenced by scripts, directly impact INP by increasing the time between user input and the resulting UI updates.
  • Evidence: INP measures the responsiveness of your website by tracking the time between user input and UI updates [debugbear.com/docs/metrics/interaction-to-next-paint]. The Long Animation Frames (LoAF) API reports what scripts are contributing to rendering delays [debugbear.com/docs/metrics/interaction-to-next-paint].
  • Impact: Slow rendering increases the time it takes for users to see visual updates after an interaction, leading to a higher INP.

3.4. JavaScript Execution

  • Description: JavaScript execution is a significant cause of poor INP.
  • Evidence: Minimizing CPU processing and running code asynchronously can help [debugbear.com/docs/metrics/interaction-to-next-paint, web.dev/articles/optimize-inp]. Long tasks, often related to deferred and module scripts executing before DOM Content Loaded, can also contribute to input delay [speedcurve.com/web-performance-guide/understanding-and-improving-interaction-to-next-paint/].
  • Impact: Inefficient or excessive JavaScript execution blocks the main thread, delaying the processing of user interactions.

4. Optimization Strategies

To address the common causes of poor INP scores, consider the following optimization strategies:

  • Minimize CPU Processing:
    • Profile your website code to identify and optimize inefficient code [debugbear.com/docs/metrics/interaction-to-next-paint].
    • Review and optimize third-party scripts that may be contributing to high CPU usage [debugbear.com/docs/metrics/interaction-to-next-paint].
  • Address Long Tasks:
    • Break up long tasks into smaller, asynchronous tasks using techniques like setTimeout [speedcurve.com/web-performance-guide/understanding-and-improving-interaction-to-next-paint/].
    • Use the Long Animation Frames (LoAF) API to identify scripts contributing to rendering delays [debugbear.com/docs/metrics/interaction-to-next-paint].
  • Optimize Rendering:
    • Ensure efficient rendering by minimizing DOM manipulations and avoiding forced synchronous layouts.
  • Optimize JavaScript Execution:
    • Defer non-critical JavaScript to reduce main thread blocking during page load.
    • Use code splitting to load only the necessary JavaScript for each interaction.
  • Run code asynchronously:
    • Run more of your code asynchronously so that the user gets an immediate UI update even if some work is still ongoing [debugbear.com/docs/metrics/interaction-to-next-paint].

5. Conclusion

Improving INP requires a multifaceted approach that addresses CPU processing, long tasks, rendering delays, and JavaScript execution. By implementing the optimization strategies outlined in this report, you can significantly improve your website's responsiveness and user experience. Regularly monitor your INP score and use tools like Chrome DevTools and the Long Animation Frames (LoAF) API to identify and address any performance bottlenecks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment