"매 user input → 매 next visible paint 의 latency". 2024-03 의 의 의 FID 의 replace. 매 Core Web Vitals member. 매 < 200ms 'good', < 500ms 'needs improvement'.
매 핵심
매 measurement
매 매 page session 의 of 의 모든 interaction 의 worst (P98).
매 input delay + processing + presentation delay.
매 응용
SEO (Google ranking).
UX.
Form / button responsiveness.
💻 패턴
Measure
import{onINP}from'web-vitals';onINP(({value,rating})=>{analytics.track('INP',{value,rating});// 매 rating: 'good' | 'needs-improvement' | 'poor'
});
Optimize: yield to main thread
button.addEventListener('click',async()=>{awaitscheduler.yield();// 매 modern API
// 매 매 chunk 의 의 의 yield
for(leti=0;i<items.length;i++){if(i%100===0)awaitscheduler.yield();process(items[i]);}});