GoogleChrome / GoogleChrome/lighthouse
Track delayed event handling
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Description
It is common in large applications to have a busy main thread that is unresponsive to events.
It would be nice to be able to label specific events as 'important' and produce timing data on how long it took for that event to be handled on the main thread.
By event, I do not necessarily mean user input. A busy main thread blocks a bunch of events such as XHR 'onload', MediaSource 'sourceopen' events, etc.
Note that user instrumentation only goes so far, not all events provide a time for how long it took before it was handled. Even if the event does supply latency timing, the UserTiming API does not accept user supplied timestamps. I do not believe this information is easily surfaced via currently available performance APIs.
It may also be tricky to associate UserTiming object with the proper originating event.
This is an important metric to measure, but I do believe that it can be noisy. Stable numbers can only be produced if we can replicate the main thread activity with a high consistency. I'm wondering if anybody has put much thought into how to produce actionable metrics for possibly noisy data.
/cc @paulirish @mgerakis @brendankenny
Contributor guide
Assessment
This issue has not been assessed yet.