Skip to content

Instantly share code, notes, and snippets.

View WebCloud's full-sized avatar

Vinicius Dallacqua WebCloud

View GitHub Profile

Common Causes and Optimization Strategies for Poor Interaction to Next Paint (INP)

Interaction to Next Paint (INP) is a Core Web Vital metric that assesses a page's overall responsiveness to user interactions. It measures the time between a user interaction (like a click or key press) and the next visual update on the page. A poor INP score indicates that the page is slow to respond to user input, leading to a frustrating user experience. To provide a good experience, pages should strive for an INP of ≤ 200 ms (Long Animation Frames API  |  Web Platform  |  Chrome for Developers). This report summarizes the most common causes of poor INP scores and outlines strategies for optimization.

Summary of Findings

The primary causes of poor INP scores are related to JavaScript execution, rendering bottlenecks (Long Animation Frames), and the impact of third-par

Interaction to Next Paint (INP) Optimization Report

This report summarizes the common causes of poor Interaction to Next Paint (INP) scores and provides actionable insights for optimization. INP measures the time between a user interaction and the next visual update on the page, reflecting a website's responsiveness. As of March 2024, INP is a Core Web Vital, directly impacting search performance. A good INP score is less than 200 milliseconds; scores over 500 milliseconds are considered poor and can negatively affect search rankings Measure And Optimize Interaction to Next Paint (INP).

Summary of Findings

The primary causes of poor INP scores are related to excessive CPU processing, long tasks, rendering delays, and unoptimized JavaScript execution. Optimizing website code, minimizing long tasks, and employing asynchronous techniques are crucial for improving INP and ensuring a responsive user experience.

Analysis of Search Resul

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)

Endpoint Name Endpoint URL (with example query param or example id) cURL (with example token) Result Image from Postman
Fetch Cosplan by date range https://coscalendar-api-3bdc9b15f518.herokuapp.com/cosplansbyDateRange/?startDate=2024-05-26&endDate=2024-07-06 curl --location 'https://coscalendar-api-3bdc9b15f518.herokuapp.com/cosplansbyDateRange/?startDate=2024-05-26&endDate=2024-07-06' --header 'Cookie: my-app-auth=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzE5MTY1ODM3LCJpYXQiOjE3MTkxNjU1MzcsImp0aSI6ImU3YjI5ODEyOGM3ODQ3YWE5ODQ5Y2Q1YTM3Y2Y0ZDhjIiwidXNlcl9pZCI6MX0.yDcj37UnjOsQyWuQf1BLOpHbcmwx8Ci0X1fbM_kXZfg; my-refresh-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcxOTI1MTkzNywiaWF0IjoxNzE5MTY1NTM3LCJqdGkiOiIyMzcyMGRlYzhjMTM0ZmE2YTQyZDBhMzc5MWEwMmMzMSIsInVzZXJfaWQiOjF9.qos5VmAXD5UO2yssnid2EzdiRf1KG9iKFIwYNIAr1LY' ```{"count":2,"next":null,"previous":null,"results":[{"id":6,"cospla
@WebCloud
WebCloud / lighhouse-utils.js
Last active October 19, 2018 14:32
Lighthouse CLI utils to help out on report and digest generation
const { error } = require('./utils');
const baseDir = __dirname;
const getReportFolder = hash => `${baseDir}reports/automated-lighthouse-${hash}`.replace('\n', '');
const getReportPath = (dirName, format, fileName = 'report') => `${dirName}/${fileName}.${format}`;
/**
* Function that will generate the report based on the results for the lighthouse run
@WebCloud
WebCloud / gist:b78e413784c56a664b7f
Last active August 29, 2015 14:15 — forked from getify/gist:5226305
Object reference tree
// `Object.make(..)` is a helper/wrapper for `Object.create(..)`. Both create a new
// object, and optionally link that new object's `[[Prototype]]` chain to another object.
//
// But `Object.make(..)` makes sure the new object always has a `__proto__` property
// (even a null one) and delegation to a `isPrototypeOf(..)` method, both of which are
// missing from the bare object (aka "Dictionary") created by `Object.create(null)`.
//
// `isPrototypeOf()` is put on a extra object that your created object can delegate to,
// if any only if you create an empty object (by not passing a `linkTo`) that otherwise
// wouldn't have access to `isPrototypeOf()`.
App.ApplicationAdapter.reopen
pathForType: (type)->
decamelized = Ember.String.decamelize(type)
"#{Ember.String.pluralize(decamelized)}.json"
// http://emberjs.com/api/classes/Ember._MetamorphView.html#event_didInsertElement workaround for the
/*
didInsertElement: function(){
console.log('only called on the first load of the view');
}
*/
// either Ember.View.reopen (beware, will execute on EVERY view) or App.MyView = Ember.View.create
init:function(){
# add "deb http://ftp.us.debian.org/debian wheezy-backports main" to /etc/apt/sources.list
sudo apt-get update
sudo apt-get install nodejs-legacy
curl --insecure https://www.npmjs.org/install.sh | sudo bash
@WebCloud
WebCloud / links-workflow-fortes2013
Last active December 16, 2015 15:19
Links da palestra de Workflow para front end