Intent to Ship: Performance Observer API

87 views
Skip to first unread message

Shubhie Panicker

unread,
May 6, 2016, 4:17:31 PM5/6/16
to blin...@chromium.org, Ilya Grigorik, Nat Duca

Contact emails

Spec

Summary
Performance Observer is a new interface to the Performance Timeline [http://w3c.github.io/performance-timeline] which allows a callback function to be invoked when there are new performance events added matching a certain criteria.

Link to “Intent to Implement” blink-dev discussion

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.

Debuggability
N/A (no additional devtools functionality needed)

Compatibility Risk
Low. There have been several discussions about this API on the W3C Web Perf working group mailing list and conference calls. There is consensus that this API is the correct step forwards.

OWP launch tracking bug

Link to entry on the feature dashboard


Ilya Grigorik

unread,
May 6, 2016, 4:41:08 PM5/6/16
to Shubhie Panicker, blink-dev, Nat Duca
\o/

This is a much needed improvement that helps both the existing and the new perf API use cases:
  • For existing perf API use cases, this API enables consumers to stop polling the performance timeline; eliminates races between consumers; eliminates the need to manage the clunky buffer sizing logic; enables more efficient overall processing (no need to do costly buffer diffs).
  • Moving forward, we're also planning to expose new perf entries via PerformanceObserver only (i.e. no more buffer interfaces) due to all of the reasons above, plus the afforded flexibility to intelligently schedule delivery of such events - e.g. batch them, delay them until idle time, and so on.
In other words, wins all around. For more context, check out: https://w3c.github.io/performance-timeline/#introduction

Also, a PerfObserver demo I built a while back: http://output.jsbin.com/xodibo/latest/quiet

non-owner LGTM! :-)

TAMURA, Kent

unread,
May 9, 2016, 3:40:28 AM5/9/16
to Shubhie Panicker, blink-dev, Ilya Grigorik, Nat Duca
Does the Web Perf WG have other browser vendor members?

--
TAMURA Kent
Software Engineer, Google


Ilya Grigorik

unread,
May 9, 2016, 5:50:06 PM5/9/16
to Michael[tm] Smith, TAMURA, Kent, Shubhie Panicker, blink-dev, Nat Duca
On Mon, May 9, 2016 at 1:43 AM, Michael[tm] Smith <mi...@w3.org> wrote:
"TAMURA, Kent" <tk...@chromium.org>, 2016-05-09 16:40 +0900:

>
> Does the Web Perf WG have other browser vendor members?

Along with Google, Microsoft is active in the WG (one of the co-chairs is
from Microsoft, and one of the editors of the Performance Timeline spec is
from Google). Apple has a rep in the group, rniwa—though I don’t think he
was involved in the PerformanceObserver discussions (or overall Performance
Timeline discussions). Mozilla is not a formal member of the WG but has
been involved in discussions in the WG’s github repos, including about the
Performance Timeline spec—and has implemented the PerformanceEntry API from
the Performance Timeline spec but not (as far as I know), the (more
recently added) PerformanceObserver API.

+1 to all of the above. Except.. Mozilla already shipped PerformanceObserver -- see below.
 
But if the context of your question is in relation to the statement in the
Intent to Ship that “there is consensus that this API is the correct step
forward”, then yeah it seems like it might be stretch to claim at this point
that there’s consensus among all the major browser-engine projects for it.

To the contrary:

- Firefox already shipped it in 43: https://bugzilla.mozilla.org/show_bug.cgi?id=1165796
- Edge: "Roadmap Priority: Medium — Development is likely for a future release." [1]
- WebKit: I can't speak on rniwa@'s behalf, but we did discuss PerfObserver [2] at TPAC and he was supportive.

Given the above, I think we have solid signals to proceed with shipping in Chrome.

ig


smaug

unread,
May 9, 2016, 5:56:06 PM5/9/16
to Ilya Grigorik, Michael [tm] Smith, TAMURA, Kent, Shubhie Panicker, blink-dev, Nat Duca
On 05/10/2016 12:49 AM, Ilya Grigorik wrote:
> On Mon, May 9, 2016 at 1:43 AM, Michael[tm] Smith <mi...@w3.org <mailto:mi...@w3.org>> wrote:
>
> "TAMURA, Kent" <tk...@chromium.org <mailto:tk...@chromium.org>>, 2016-05-09 16:40 +0900:
> >
> > Does the Web Perf WG have other browser vendor members?
>
> Along with Google, Microsoft is active in the WG (one of the co-chairs is
> from Microsoft, and one of the editors of the Performance Timeline spec is
> from Google). Apple has a rep in the group, rniwa—though I don’t think he
> was involved in the PerformanceObserver discussions (or overall Performance
> Timeline discussions). Mozilla is not a formal member of the WG but has
> been involved in discussions in the WG’s github repos, including about the
> Performance Timeline spec—and has implemented the PerformanceEntry API from
> the Performance Timeline spec but not (as far as I know), the (more
> recently added) PerformanceObserver API.
>
>
> +1 to all of the above. Except.. Mozilla already shipped PerformanceObserver -- see below.
>

No we didn't. It is implemented but dom.enable_performance_observer pref isn't enabled by default.
And global scope doesn't have PerformanceObserver, not in Window scope nor in Worker scope.


-Olli


> But if the context of your question is in relation to the statement in the
> Intent to Ship that “there is consensus that this API is the correct step
> forward”, then yeah it seems like it might be stretch to claim at this point
> that there’s consensus among all the major browser-engine projects for it.
>
>
> To the contrary:
>
> - Firefox already shipped it in 43: https://bugzilla.mozilla.org/show_bug.cgi?id=1165796
> - Edge: "Roadmap Priority: Medium — Development is likely for a future release." [1]
> - WebKit: I can't speak on rniwa@'s behalf, but we did discuss PerfObserver [2] at TPAC and he was supportive.
>
> Given the above, I think we have solid signals to proceed with shipping in Chrome.
>
> ig
>
> [1] https://developer.microsoft.com/en-us/microsoft-edge/platform/status/performanceobserver
> [2] https://www.w3.org/2015/10/webperf-tpac2015-minutes.html
>
> --
> 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
> <mailto:blink-dev+...@chromium.org>.

Chris Harrelson

unread,
May 9, 2016, 6:30:32 PM5/9/16
to smaug, Ilya Grigorik, Michael [tm] Smith, TAMURA, Kent, Shubhie Panicker, blink-dev, Nat Duca
LGTM1 to ship

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Dimitri Glazkov

unread,
May 9, 2016, 6:31:00 PM5/9/16
to Chris Harrelson, smaug, Ilya Grigorik, Michael [tm] Smith, TAMURA, Kent, Shubhie Panicker, blink-dev, Nat Duca
LGTM2.

:DG<

Ilya Grigorik

unread,
May 9, 2016, 7:06:28 PM5/9/16
to smaug, Michael [tm] Smith, TAMURA, Kent, Shubhie Panicker, blink-dev, Nat Duca

On Mon, May 9, 2016 at 2:56 PM, smaug <sm...@welho.com> wrote:
+1 to all of the above. Except.. Mozilla already shipped PerformanceObserver -- see below.


No we didn't. It is implemented but dom.enable_performance_observer pref isn't enabled by default.
And global scope doesn't have PerformanceObserver, not in Window scope nor in Worker scope.

<facepalm> Of course, I had the flag enabled... </facepalm>

Thanks for the correction! Hope we can get it flipped to on by default soon :)

TAMURA, Kent

unread,
May 9, 2016, 7:09:06 PM5/9/16
to Shubhie Panicker, blink-dev, Ilya Grigorik, Michael [tm] Smith, Nat Duca
Thank you for the additional information.  LGTM3.

Reply all
Reply to author
Forward
0 new messages