Conditional tracing for long animation frame(LoAF) timing API
- Category
- Performance
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Introduce a new conditional tracing that help diagnose causes of LoAFs. This new feature let web app developers add conditional tracing in the app code, and these tracing points will be reported by the LoAF API if they are executed during a LoAF. This is a powerful and easy-to-use tool to help diagnose LoAFs.
Motivation
A number of Performance APIs, (e.g. LoAF API) monitor web site performance, but the information provided by these APIs by themselves may not be sufficient to locate the root cause of performance problems. One example is the wrapper problem of the LoAF API: with a framework wrapping the event handlers, the script entry point cannot identify the event handler invoked during the LoAF. The performance User Timing API can be used to diagnose performance problems further when additional information is needed to locate the root cause. However, it results in unnecessary performance overhead and requires extra analysis to relate the LoAF to right tracing points. This new lightweight User Timing API extension is specifically designed to support LoAF. Compared to the standard User Timing API, it offers lower runtime overhead and improved developer ergonomics. A similar enhancement could be applied to the Event Timing API in the future.
Standards & signals
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issuetracker.google.com/issues/383157188
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=conditional-tracing-for-long-animation-frame-loaf-timing-api
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Conditional%20tracing%20for%20long%20animation%20frame(LoAF)%20timing%20API
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Conditional%20tracing%20for%20long%20animation%20frame(LoAF)%20timing%20API
- Baseline status: https://webstatus.dev/?q=Conditional%20tracing%20for%20long%20animation%20frame(LoAF)%20timing%20API
Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/ConditionalTracing/explainer-for-loaf.md