Open Bug 1420913 Opened 8 years ago Updated 1 year ago

consider notifying PerformanceObserver using idle dispatch

Categories

(Core :: DOM: Performance APIs, enhancement, P3)

57 Branch
enhancement

Tracking

()

People

(Reporter: bkelly, Unassigned)

References

Details

Apparently the PerformanceObserver spec says that events should be dispatched at low priority during idle times. No browser does this yet, though. Chrome is thinking of doing it: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TgoXNRtA3Zs We should consider it as well. Valentin, Andrea, what do you think?
Flags: needinfo?(valentin.gosu)
Flags: needinfo?(amarchesini)
Note, I think changing this would mainly involve changing this: https://searchfox.org/mozilla-central/source/dom/performance/Performance.cpp#518 To use NS_IdleDispatchToCurrentThread().
Andrea has more of an insight into PerformanceObserver behaviour, but this sounds like a reasonable change to me.
Flags: needinfo?(valentin.gosu)
I think the main concern I have is if sites are depending on the timing somehow. The blink-dev thread has some discussion of that.
(In reply to Ben Kelly [:bkelly] from comment #3) > I think the main concern I have is if sites are depending on the timing > somehow. The blink-dev thread has some discussion of that. It seems that the discussion is suspended waiting for takeRecords(). We should implement takeRecords() as well, btw. /me filing a bug.
Flags: needinfo?(amarchesini)
See Also: → 1436692
Priority: -- → P3
Component: DOM → DOM: Core & HTML
Severity: normal → S3
Component: DOM: Core & HTML → DOM: Performance
You need to log in before you can comment on or make changes to this bug.