Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to DCLS that better represents user experience of jank #7

Open
wildlyinaccurate opened this issue Jun 5, 2019 · 1 comment

Comments

@wildlyinaccurate
Copy link

I'm not convinced that DCLS is representative of how users perceive layout instability. DCLS would weight several layout shifts in a short space of time as separate "janks", however people typically perceive delays of <100ms as near-instantaneous.

An alternative might be to group layout shifts into time buckets, and sum the biggest layout shift for each bucket. I believe this approach would produce a score that more closely represents how a user experienced the janks.

I've made a contrived example here that demonstrates what I'm talking about. This page makes several small janks ~10ms after one another, and then one bigger jank a second later. DCLS takes all of those small janks into account, but I believe most people will perceive it as a single jank. https://wildlyinaccurate.com/webdump/dcls.html

@skobes-chromium
Copy link
Collaborator

This is an interesting idea to explore as we iterate on the metric. I agree that the amount of time between consecutive layout shifts has a correspondence to the perceived severity of layout instability, which is not reflected in the current definition. That said, I think we should be cautious about accumulating too much heuristic-oriented complexity in pursuit of a perfect alignment with user perception. But incorporating some consideration of "elapsed time since previous shift" seems reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants