Intent to Experiment: [Web Perf] Layout Jank API

245 views
Skip to first unread message

Steve Kobes

unread,
Jan 14, 2019, 11:07:57 AM1/14/19
to blin...@chromium.org, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
Contact emails

Spec
To be added; see explainer at:

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

Link to "Intent to Implement" blink-dev discussion

Goals for experimentation
By allowing developers to observe jank scores on their sites and give us feedback about unexpected results, we can assess the quality of the jank score computation algorithm and iterate quickly on it.  We will also use feedback to validate the shape of the API.

Experimental timeline
M73 - M76

Any risks when the experiment finishes?
None

Ongoing technical constraints
None

Debuggability
No DevTools support at present.  We may consider adding a "show jank regions" mode in the future, but this is not required for the origin trial to be useful.

Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?
Yes

Link to entry on the feature dashboard

Yoav Weiss

unread,
Jan 21, 2019, 10:47:39 AM1/21/19
to Steve Kobes, blink-dev, Timothy Dresser, n...@chromium.org, Bryan McQuade
With my API owner hat off, I'd like to state my support for this API. The problem of layout instability, where content moves around once the image dimensions were downloaded, is a severe UX problem the web has always suffered from, and which became worse with responsive designs and mobile device proliferation.
We are working on tools that will enable developers to avoid that, such as the intrinsicsize attribute, but having a way for developers to measure that in the wild, as well as a standard way for lab testing tools (e.g. lighthouse and webpagetest) to surface that would be an incredible win.

On top of that, from the compatibility side of things, the risk here is extremely small, since, like other performance APIs, removing it in the future is unlikely to cause content breakage. 

--
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/CAAjAU%3DZA2%3De_9vJBTtuCZ3L1A-0tpxjm4EZ81a634p8L6ZGzeQ%40mail.gmail.com.

Chris Harrelson

unread,
Jan 21, 2019, 12:15:56 PM1/21/19
to Yoav Weiss, Steve Kobes, blink-dev, Timothy Dresser, n...@chromium.org, Bryan McQuade

Adam Argyle

unread,
Jan 21, 2019, 4:59:47 PM1/21/19
to blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
This API is exciting to me! I'd love to dogfood and early test this across some layouts. 

Jochen Eisinger

unread,
Jan 28, 2019, 3:20:47 AM1/28/19
to Adam Argyle, blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
Will this API expose cross-origin information, i.e., layout jank in cross origin iframes?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Steve Kobes

unread,
Jan 28, 2019, 8:20:33 AM1/28/19
to Jochen Eisinger, Adam Argyle, blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
On Mon, 28 Jan 2019 at 03:20, Jochen Eisinger <joc...@chromium.org> wrote:
Will this API expose cross-origin information, i.e., layout jank in cross origin iframes?

This is a good question.  At present the layout jank API only reports jank in the current frame, not in subframes (either same-origin or cross-origin).  However we would like to change this if possible, as it limits the utility of the API.  We'll likely include subframe jank if and when we start reporting aggregate jank scores through tools like PageSpeed Insights and the Chrome User Experience Report, so it would be nice if developers had some way to reproduce those page-wide jank scores in the layout jank API.

Jochen, do you think it would be acceptable to expose a cross-origin subframe's layout jank score, or does that leak too much information?

tdre...@google.com

unread,
Jan 28, 2019, 8:54:49 AM1/28/19
to Steve Kobes, Jochen Eisinger, Adam Argyle, blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
I'm confident we can't expose cross origin subframe's layout jank. We could in the future consider making a simpler way to get the sum of all same origin frame layout jank than explicitly asking each same origin frame though.

Jochen Eisinger

unread,
Jan 29, 2019, 3:40:42 AM1/29/19
to tdre...@google.com, Steve Kobes, Adam Argyle, blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
sg, thx for clarifying.

Steve Kobes

unread,
May 16, 2019, 3:27:03 PM5/16/19
to Jochen Eisinger, Tim Dresser, Adam Argyle, blink-dev, tdre...@chromium.org, n...@chromium.org, bmcq...@chromium.org
As of Chrome 76.0.3796.0 (current canary), three breaking changes have been made to this API:
  • the performance entry interface has been renamed from PerformanceLayoutJank to LayoutShift
  • the entryType string has been changed from "layoutJank" to "layoutShift"
  • the fraction attribute has been renamed to value
All current users of the origin trial will need to update their code accordingly.

The explainer has been updated to reflect new terminology.  The command-line flag to enable the feature has changed from
    --enable-blink-features=LayoutJankAPI
to
    --enable-blink-features=LayoutInstabilityAPI
Reply all
Reply to author
Forward
0 new messages