Intent to Prototype: Long Animation Frame Timing (LoAF)

436 views
Skip to first unread message

Noam Rosenthal

unread,
Feb 16, 2023, 2:54:54 AM2/16/23
to blink-dev

Contact emails

nrose...@chromium.org

Explainer

https://github.com/w3c/longtasks/blob/loaf-explainer/loaf-explainer.md

Specification

See https://github.com/w3c/longtasks/issues/103 and explainer

Summary

Revamp long tasks: - Measure long frames, from beginning of task until end-of-rendering or noop, as it's a more robust and representative unit of measurement than a "task". - Add attribution/breakdown: style & layout, script details.



Blink component

Blink>PerformanceAPIs

Motivation

Long tasks, shipped in Chrome 58, are marketed as the way to diagnose responsiveness/jank issues such as long INP. However, in the years since we've shipped them we found that they are lacking: 1. They don't contain the rendering phase, which means a lot of what goes into blocking interactivity is not counted 2. Long tasks are missing details about what made the task long 3. UI events are not specified nor implemented in terms of tasks, causing confusion. 4. Internal changes to how we deal with tasks in Chrome change the meaning of a "task" too often. The revamp: - Counting frames instead of tasks: from the beginning of the task until one of the following occurred:

(1) the frame has been rendered (could be more than one task)

2) the task is complete and there are no changes (a classic long task without visual updates). - Add information about how long it took to style&layout, as well as a breakdown of long-running same-frame top-level scripts, plus additional information that can help diagnose long main-thread blocking periods.



Initial public proposal

https://github.com/w3c/longtasks/issues/103

TAG review



TAG review status

Pending

Risks

It's still early, we need to see that we don't expose too much info here, either by bombarding with data or with privacy-sensitive data. Will review this once we assess the usefulness and feasibility.


Interoperability and Compatibility

Too early

WebView application risks
N/A

Debuggability

Concepts and naming have to align with DevTools timeline concepts and naming. Conversation about this has begun.

Is this feature fully tested by web-platform-tests?

Not yet!

Flag name

LongAnimationFrameTiming

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1392685

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6118675067699200

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages