Web Vitals & Performance (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)
Interaction to Next Paint (INP) Deep Dive: The 3 Phases of Interaction Latency.
senior LevelSystem Design
In Simple Words: Interaction to Next Paint (INP) replaced First Input Delay (FID) as Google's responsiveness Core Web Vital. While FID measured only the first interaction's input delay, INP measures the worst latency across all clicks, taps, and keypresses throughout the entire user session.
INP latency is divided into three distinct phases:
- Input Delay: Time between user interaction and when event handlers begin executing (caused by background main-thread tasks).
- Processing Time: Execution duration of all associated event callbacks (
click,keydown). - Presentation Delay: Time needed by the browser to recalculate layout, repaint styles, and present the updated frame on screen.
Good INP is $\le 200\text{ms}$ at the 75th percentile of sessions.