GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.34k stars 105 forks source link

High INP on link drag and click #170

Closed Zdend closed 7 months ago

Zdend commented 7 months ago

Describe the bug When anchor tags are dragged and clicked a few ms later, the extension reports a high INP.

To Reproduce Go to any Single Page Application (non SPA works as well, it will just unload your page so it's harder to see), drag an anchor link as if you were about to bookmark it and then release pointer and actually click the link. High INP (300-400ms) will be reported even though there is barely any work on the event handler. Chrome Performance analysis report also highlights this as a problematic interaction with a long Input Delay. A long duration is also reported by PerformanceObserver event timing native to the browser.

Expected behavior Dragging of links will not contribute to high INP, input delay seems to be native to the browser that allows the dragged link to return to its original position after mouse has been released and isn't any indication of poor site responsiveness. Users might accidentally trigger this if they move their mouse whilst clicking and lingering a big longer on the target element.

Version:

Additional context, screenshots, screencasts INP drag and click

Screenshot 2024-02-01 at 2 02 42 pm
rviscomi commented 7 months ago

Thanks @Zdend but I think your concern is more about the way INP is actually measured, rather than an issue with the extension itself as I'm able to reproduce this on a page with the extension disabled:

image

Would you mind raising this in a new thread on web-vitals-feedback?

mmocny commented 7 months ago

This is a known issue on MacOS specifically: https://bugs.chromium.org/p/chromium/issues/detail?id=1385108#c3

It seems this is not really a measurement bug. It seems that this is a reporting real jank that happens on these systems. I think we should make improvements to tracing and DevTools to make it more obvious WHY this type of interaction is reported as slow.

(We will also of course try and resolve or work around such issues so they don't happen in the first place.)