Closed toddreifsteck closed 7 years ago
Sounds good to me. Maybe we could add it as a Note in section 2.
To deliver the best performance developers are encouraged to eliminate unnecessary callbacks (e.g. requestAnimationFrame, setTimeout, and similar callbacks) that do not perform meaningful work; do not keep such callbacks firing and waiting for events to react, instead schedule them as necessary to react to events once they become available. Such pattern improves overall efficiency, and enables the user agent to schedule long idle callbacks (>16ms) that can be used to efficiently perform large blocks of background work.
Is that roughly what we're looking for?
Sounds good to me, although maybe we want to explicitly mention the 50ms (i.e., replace ">16ms" with "up to 50ms" so that developers don't think it's OK to schedule things every 16ms?
The spec allows for up to 50 ms chunks of idle time, but that only seems possible if there are no setTimeout, no RAF, no CSS animations and likely a few other exclusions... It may be helpful to explain a few more details about how a web page author can put themselves in the position to get large idle chunks of time.