What is INP and how do you reduce it?
Assesses fundamental understanding of Web Performance conventions, runtime behavior, and memory/performance considerations.
Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.
Interaction to Next Paint measures the time from a user interaction such as a click, tap or key press until the browser paints the next frame, across the whole visit, reporting roughly the worst interaction. A long INP means the page felt laggy. It is driven by long tasks that block the main thread: heavy event handlers, large synchronous renders, layout thrashing and third-party scripts. Diagnose with the Performance panel's interactions track and the web-vitals library with attribution.
Improvements: break up long tasks with scheduler.yield() or setTimeout(0) and yield to the browser. Keep event handlers short and debounce high-frequency events. Avoid reading layout properties such as offsetHeight immediately after writes, which forces reflow. Reduce hydration cost and re-render less with fine-grained reactivity or memoisation. Defer and lazy-load non-critical third-party scripts, and move heavy work to Web Workers.
INP is about perceived responsiveness, so optimise the few interactions users actually perform.
Candidate Response Strategy & Interview Tips
- Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
- Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
- Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
- Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.