Performance Observer delivery should be delayed |
|||||
Issue descriptionWe should add random delays in delivery to prevent apps from using this to drive app logic. Ideally delivery of performance observer entries should be delayed until idle period.
,
Jan 8 2018
Nicolas, can you file a bug for the takeRecords work, and block this bug on it?
,
Jan 8 2018
,
Apr 23 2018
Is there any update for this bug?
,
Apr 23 2018
Nicolas, I think we still need to get rough consensus on takeRecords from the web perf WG, right?
,
Apr 23 2018
No, takeRecords has landed in the spec [1] and has been implemented in Chrome[2]. [1] https://github.com/w3c/performance-timeline/pull/98 [2] https://chromium-review.googlesource.com/c/chromium/src/+/820892
,
Apr 23 2018
Ah, then this is unblocked! Thanks!
,
May 2 2018
Old patch here: https://chromium-review.googlesource.com/c/chromium/src/+/738353 Blink-dev discussion here: https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/takerecords/blink-dev/TgoXNRtA3Zs/Ui7FBuyaBgAJ
,
May 8 2018
,
Jul 25
I thought we had a new reason to wait on this, but can't seem to recall the reason. Should I start implementing this?
,
Jul 26
We were waiting on takeRecords, but it has shipped. Feel free to pick up my old patch.
,
Aug 1
Actually thinking about this, it's not clear to me we should be doing this before further changes to the Performance Timeline. Delaying the observer callback would just encourage developers to get the entries from the buffer instead of using PerformanceObserver. I think that there are plans to only buffer entries that occur before onload. Until that happens, I think we should punt on this change.
,
Aug 1
"Delaying the observer callback would just encourage developers to get the entries from the buffer instead of using PerformanceObserver." I'm not sure this is the case. I think many users of these APIs understand the performance impact of dispatching these lazily. (Analytics frameworks at least will understand this). My guess is that other consumers likely won't care enough about delayed entries to worry about using the performance timeline.
,
Aug 1
The point of this bug is to "prevent apps from using this to drive app logic". So this bug is not about analytics providers. And I suspect that if they use the results to drive app logic then they will care about the fact that the callbacks are delayed, because it will cause noticeable problems.
,
Aug 1
Ah, sorry. Hopefully if they're driving app logic with perf observer entries, it will be clearly superior to migrate away from performance entries entirely than to poll the performance timeline. Hopefully developers will realize that polling the timeline is terrible. My guess is that they will?
,
Aug 1
Hmm well I can implement this change but I should note that I'm not convinced that this is the right thing to do at the moment. Another potential problem: if we end up doing resource timing updates via PerformanceObserver, the use cases will not work properly with a delayed callback.
,
Nov 16
Ping. Any update here? |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tdres...@chromium.org
, Oct 2 2017