Web Vitals & Performance (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
Breaking down INP into its 3 Phases.
senior LevelCode ExampleSystem Design
In Simple Words: When a user clicks a button:
sql
[ User Clicks ]
|
v
+--------------------------+
| 1. Input Delay | -> Waiting for main thread to finish running earlier tasks
+--------------------------+
|
v
+--------------------------+
| 2. Processing Duration | -> Executing event callbacks (onClick, state updates)
+--------------------------+
|
v
+--------------------------+
| 3. Presentation Delay | -> Re-rendering DOM, recalculating styles, GPU compositing
+--------------------------+
|
v
[ Next Frame Painted on Screen ]