INP - Confused about presentation delay trigger

185 views
Skip to first unread message

Fabio Cazzavillan

unread,
Jul 4, 2025, 4:25:25 PM Jul 4
to web-vitals-feedback
Hello everyone, 

I'm having some issues solving my INP problems, mostly related to presentation delay.
This is a trace I'm analyzing:  https://trace.cafe/t/nMdzngakx4

Here I'm having a 275ms INP interacting with the button,
but I can see more than one Paint event happening during the presentation delay timespan (and no one closed to the end of the presentation delay) 

What could I do here?

Thank you!

Michal Mocny

unread,
Jul 5, 2025, 10:03:05 AM Jul 5
to Fabio Cazzavillan, web-vitals-feedback
First-- thank you for uploading a trace and using annotations to make it easy to follow!

First: "Paint" is a main thread concept while "Presentation" comes off thread: Compositor Thread -> Gpu Process -> Hardware.  The whole rendering pipeline is parallelized so you can have multiple Paints "in flight" before a previous one is actually presented.  Depending on the platform and browser settings the depth of this pipeline can be limited, but I think ~3-4 Paints is a common limit for frames "in flight".

I don't fully trust the color codings on the Screenshots/Frames layer, but just quickly glancing at the colors in your trace having a bunch of yellow/red signals that the compositor is producing updates without main thread content and so this is a first sign that main thread updates are delayed.

When I switch to Perfetto, I can look at the full details of PipelineReporter trace events, which describe the rendering pipeline.  In this case, I see a very complicated scenario:

Screenshot 2025-07-05 at 09.49.17.png
  • First, from the CrRendererMain thread, I marked the click event processing range, and the Paint + Commit of that "next paint" animation frame
  • I then scroll down to find "EventsInAnimationFrame" to find the interaction and look up its EventPresentation time and mark that-- this is the "end" of the interaction.
  • With these time points marked, I scroll down to find PipelineReporter trace events which describe what happened with rendering in this time range.
  • The PipelineReporter (PR) for the first animation frame which includes the "Next Paint" for the Click event (Look for SendBeginMainFrameToCommit overlapping your Paint), indeed ends with STATE_DROPPED
    • Let's call this PR1
  • The GPU process does present a STATE_PRESENTED_PARTIAL compositor update for PR1 (it's a different PR event but ends at the same time).
  • I don't see any attempt to update rendering for the next 2 vsyncs (assuming 60hz)
  • Then there is another main thread Paint+Commit, also DROPPED, also with PARTIAL compositor update (Let's call this PR2)
  • Finally, your initial paint is included and presented in a PR3, after approximately 100ms of extra delay after the first PARTIAL presentation

So, this describes what happened and confirms that the numbers are accurate -- but why couldn't Chrome present the main thread update for 100ms?

I see two clues:
  • Several Animations start before the Click interaction, and a lot start after.  This is a classic sign of "hover" effects being left on mobile, which trigger with touchstart.
  • I see a lot of "RunTask" in CompositorGpuThread in this time range
Unfortunately, this trace doesn't have enough tracing details to dig beyond that.  My recommendation, if you can, is to re-record with:
  • Chrome Canary if you can
  • DevTools experimental feature enabled-- Performance Panel: Show all events
Cheers,

--
You received this message because you are subscribed to the Google Groups "web-vitals-feedback" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-vitals-feed...@googlegroups.com .
To view this discussion visit https://groups.google.com/d/msgid/web-vitals-feedback/fb53d724-1de7-4007-a623-b104a03697e4n%40googlegroups.com .

Fabio Cazzavillan

unread,
Jul 18, 2025, 4:24:46 AM Jul 18
to web-vitals-feedback
First of all thank you,
sharing the way you used to debug this is really helpful and I took a deep dive on each of those lines :)
As you asked, I got a new record with Canary using the "Show all events", here's the  trace.cafe .

Do you think that reducing the animations affecting GPU could help? (removing them/reducing timings)

Thank you, again!
Reply all
Reply to author
Forward
0 new messages