Intent to Extend Origin Trial: EventTiming

67 views
Skip to first unread message

n...@chromium.org

unread,
Oct 11, 2018, 12:01:58 PM10/11/18
to blink-dev

Contact emails

n...@chromium.org, tdre...@chromium.org


Spec

https://github.com/WICG/event-timing


Summary

Monitoring event latency today requires an event listener. This precludes measuring event latency early in page load, and adds unnecessary performance overhead. The Event Timing API gives developers insight into the latency of a subset of events triggered by user interaction. In order to capture user pain caused by slow initial interactions, the event timing API includes First Input Delay (FID).


An Origin Trial for EventTiming started in Chrome M68 and is scheduled to end in Chrome M69 (Oct 9). We intend to begin another Origin Trial in Chrome as soon as possible (M71).


Previous trial results: we got feedback from two major users. One of them said that their event handling framework seemed to prevent them from using the API (injected lag was not being captured in the event timings). Our solution to this is to 1) consider including microtask execution duration in some of the timestamps 2) consider adding a signal so the developers can tell us when event work is done.


The second user said that they’d like to use Event Timing to do the following, without registering event handlers everywhere:

  • Report on all (slow) input delays

  • Report on the % of inputs that had a delay

  • Report a more accurate FID than the event-handler based version

To fulfill all of these use cases, we will need to implement eventCounts (which is currently not implemented, but defined in the spec).


To ship, we need to 1) finish the implementation 2) get consensus from the WebPerf Working Group (this will be presented at TPAC).


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/event$20timing%7Csort:date/blink-dev/QNE6TVQve-0/vITXx1N5BQAJ


Goals for experimentation

The goal this time is to gain more developer feedback from the FID portion of EventTiming. Since it is exposed in CrUX, we’d like to give developers that are very keen on improving the value to sign up for the origin trial, obtain FID data, and possible provide feedback about how to make it more accurate or actionable.


Experimental timeline

We'd like this extension to run for two milestones: M70 and M71.


Any risks when the experiment finishes?

No, because this is just affecting performance measurements.


Reason this experiment is being extended

https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/event$20timing%7Csort:date/blink-dev/wybNlFUskig/LvWIDZ1eAQAJ

The experiment is being extended because we’re not ready to ship but want to continue exposing FID on CrUX.


Ongoing technical constraints

None


Debuggability

When enabled, FID is exposed via javascript either via PerformanceObserver (requires early registration) or via the performance timeline if it occurs before onload:

// Register observer during onload.

const performanceObserver = new PerformanceObserver …

performanceObserver.observe({entryTypes:['firstInput']});

// Or get it from the buffer.

performance.getEntriesByType(‘firstInput’);


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

https://www.chromestatus.com/feature/5167290693713920


Chris Harrelson

unread,
Oct 16, 2018, 12:24:43 PM10/16/18
to n...@chromium.org, blink-dev
LGTM

--
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/197e05fb-cb26-460e-a9b2-86291ac99aac%40chromium.org.
Reply all
Reply to author
Forward
0 new messages