Contact emails
ma...@chromium.org, tdre...@chromium.org
Design doc/Spec
WICG - Event Timing Web Perf API
Summary
The Event Timing API will enable web developers to measure event latency even early before the page load. It reuses the performance observer API and performance API to provide such ability.
Specifically, the API returns these information in its performance entries:
event timestamp
start of event processing time
end of event processing time
Motivation
Monitoring event latency today requires an event listener. This precludes measuring event latency early in page load, and adds unnecessary performance overhead.
The API would allow:
Observe the queueing delay of input events before event handlers are registered.
Measure combined event handler duration.
Risks
Interoperability and Compatibility
Edge: No clear signal. Requested data from origin trial.
Firefox: No signals
Safari: No clear signal. Requested additional data, which we plan to gather via origin trial.
Web developers: No recorded feedback. Some positive response from earlier face to face discussions.
Ergonomics
The event timing have two major use cases:
Buffer long latency UI events happening before onload.
Observe long latency UI events with performance observers when users want to.
In order to get the buffered event timing entries before ‘onload’, one can do the following:
performance.getEntriesByType(‘event’)
In order to observe the event with performance observer, one just needs to use performance observer to observe “event” entry type.
new PerformanceObserver(callback).observe({ entryTypes: ['event'] });
Activation
Event Timing reuses the existing performance observer API and performance timeline API, so it would be easy for developers to adopt immediately.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Is this feature fully tested by web-platform-tests?
This feature cannot be tested by web-platform-tests but can be tested by layout tests. One of the difficulty about testability in WPT is that JS cannot trigger events that are dispatchable with standard API. But we can simulate these events with GPU benchmarking extension.
We can test this feature as it was done for pointer events (example), where manual test are provided, and automated tests which automate these manual tests.
We can test the feature with these two scenarios:
Onload happen before observer registration
Onload happen after observer registration
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5167290693713920
Requesting approval to ship?
Not yet
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALKRbLaHV0TK1L759dO47pz2v47Owz16GfpEXBSCQ%2BkEtPmH9g%40mail.gmail.com.
// Doesn't require an event listener of this type to be registered.