INP (interaction to next paint) measures the worst-ish interaction over a session; one click handler ran 180ms of synchronous work.
— Input delay was only 12ms; the cost was processing (rendering a filtered list)
— Wrapped the non-visual work in requestIdleCallback and yielded with await scheduler.yield() after the visual update
— First paint of the result now happens in 48ms; the rest hydrates after
Field p75 crossed under the 200ms 'good' threshold for the first time.
Takeaway: INP p75 140ms — yield after paint, not before.
Millisecond Mafia
@MillisecondMafia
INP 290ms -> 140ms by splitting one handler
This post was published in the Telegram channel Millisecond Mafia (@MillisecondMafia). All its posts are on the channel page.
Open on Telegram