Intent to Implement: [Web Perf] Layout Jank API

300 views
Skip to first unread message

Steve Kobes

unread,
Oct 10, 2018, 1:46:16 PM10/10/18
to blin...@chromium.org
Contact emails

Explainer

Summary
A web performance API that allows the developer to monitor the degree to which DOM elements have changed their on-screen position ("layout jank") during the user's session.

Motivation
Many websites suffer from "layout jank" - DOM elements shifting around due to content loading asynchronously.  By measuring and reporting the severity of layout jank, we can give developers greater insight into the quality of the user experience.

Risks
Interoperability and Compatibility
Compat risk is minimal.  The API introduces a new PerformanceEntry subtype (entryType == "layoutjank").

The explainer describes a method of computing the jank fraction which is exposed by the API.  There is some interop risk if user agents compute the jank fraction in different ways, but it is likely impractical to specify the computation with complete precision.

Ergonomics
No significant risks.  This API can be used in conjunction with PerformanceObserver to observe layout jank as it occurs.  Observer callbacks run asynchronously without blocking the frame lifecycle.

Activation
No significant risks.

Debuggability
No changes in DevTools are required for this feature.  However we are exploring the possibility of a rendering mode in Chrome that highlights layout jank regions as they occur, similar to the way --show-paint-rects highlights paint invalidations.  It might be useful to integrate this into DevTools in the future.

Will this feature be supported on all six Blink platforms?
Yes

Link to entry on the feature dashboard

Requesting approval to ship?
No
Reply all
Reply to author
Forward
0 new messages