-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
metric: Time to Interactive #27
Comments
Maybe this is when there's enough yielding that the UI can change or interact or show progress every 16.7ms (i.e. 60 FPS)?
Maybe mention that deferred work may be scheduled and run while not affecting TTI (as long as it's not clogging things up)? |
The current SH metrics, Responsiveness and Efficiency, only measure aspects of the user experience that actually happened. Was this interaction actually slow? However, we know of certain types of behaviors that sites can engage in that are risky, and might have impacted responsiveness if the user had behaved differently. For example, if sites spend longer than 50ms on a single given javascript task, then that would impact responsiveness if the user attempts to interact with the page during it. It's like speeding: it's hazardous even if it doesn't cause a crash. We have identified other types of hazards, but we're starting with long idle tasks. This CL produces a single 'hazard' metric for a given trace, with diagnostic values for each IdleExpectation. This CL scores the risk of each long idle task as if it had impacted an ideal Scroll Response that had been minding its own business. Longer idle tasks are given worse (higher) hazard scores than relatively shorter idle tasks. Extending the analogy, the faster you speed, the higher your ticket fine. The per-UE hazard scores are perceptually blended like responsiveness scores, but require a different weighting function since they are smallerIsBetter. test_data/trace_amp-obama-2.json is a good manual test case. This metric may eventually be renamed to something biggerIsBetter like "readiness" or "availability" per GoogleChrome/lighthouse#27 BUG=catapult:#1242 Review URL: https://codereview.chromium.org/1823323002
I've updated the definition of the TTI above metric based on latest discussions with @benshayden, @skyostil, japhet@, @pbakaus and others. |
Are we sure TTI should block on domContentLoadedEventEnd? I find that many pages start to become interactable before parsing is complete. If for instance there's a script in the footer inserted via doc.write, this can delay DCL firing when the CPU will be idle and the page interactive. That said, I think it's also reasonable to discourage pages from running the parser a long time after their content is usable - we can message to devs that they shouldn't do this and if they do so, our loading indicators may stay visible longer than they would like. But that also means that some existing content will continue to show a loading indicator / not be considered interactive until after it has reached the interactive state. |
Hah. Pat pretty much the same comment yesterday on the Progressive page Load Metrics doc yesterday(https://docs.google.com/document/d/1oiy0_ych1v2ADhyG_QW7Ps4BNER2ShlJjx2zCbVzVyY/edit#) Quoting him, then me..
I agree that DCL be a direct dependency here as its not visual. Main thread availability will tackle CPU contention, and layout stability for the rest of the blocking script impact. |
Time 'To Interactive (or TTI) is a classic success metric across the web, games and application development. We're attempting to provide a robust version of it for the web platform.
Key goals for the metric:
A working definition for Time To Interactive
Updated: April 6, 2016
There are two major timestamps, composed of smaller ones:
Timestamp: Visually ready for interaction
Visually ready is the Math.max() of these timestamps:
DOMContentLoaded
+ top frame's images (who started before DCL) are loaded (IMO, we should use this one)font-awesome
?Timestamp: Main thread ready for interaction
Once visually ready has hit, we begin considering thread availability.
requestIdleCallback
for deadlines@skyostil added: "it's super hard to congest the compositor, but a fair indicator will be availability of time on main thread because a) a lot of work will be main-thread bound and b) CPU contention (he thinks) can sometimes block the compositor from allowing scroll."
@paullewis added: "some of this may be in our wording where we explain that we're treating main thread as a proxy for interactivity"
Main-thread dependent input events
touchstart
, etc) the same as ones without?Key Data, Goals, and Scoring
navigationStart
─⇥ visually readynavigationStart
─⇥ thread ready- Goal: `max(visReady,threadReady)`should be < 5000ms - Scoring TBD
The text was updated successfully, but these errors were encountered: