[webkit-dev] Implementing requestIdleCallback

Ryosuke Niwa rniwa at webkit.org
Mon Oct 7 20:51:55 PDT 2019


Hi all,

I'm starting the effort to implement requestIdleCallback [1] in WebKit in
https://bugs.webkit.org/show_bug.cgi?id=164193. It's an API for executing
scripts when the browser is idle. It's supported by both Gecko & Blink as
well as the old Edge engine.

Because we don't plan on implementing any sort of scheduler or the
literal event loop in WebKit, the major part of this effort involves
identifying task sources [2] that interact with the idleness as
discussed in https://github.com/w3c/requestidlecallback/issues/71, and
contributing to more explicitly define what "idle" means in the cooperative
scheduling specification itself.

This would entail studying the use thereof and refactoring of Timer,
GenericTaskQueue, GenericEventQueue, etc... in order to track origins of
tasks and determining the quality of service of each task; e.g. whether a
given task is considered as a task that should delay requestIdleCallback if
it's author observable, and if not, then its relative priority with
requestIdleCallback.

[1] Spec: https://w3c.github.io/requestidlecallback/
[2]
https://html.spec.whatwg.org/multipage/webappapis.html#generic-task-sources

- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20191007/9e3a6c65/attachment.html>


More information about the webkit-dev mailing list