3 ms·
(Chromium dev here.) For the most part, events can't really accumulate, because not running code means no new events are posted. The throttling applies to setT
by chhamilton 6y ago
(Chromium dev here.)
For the most part, events can't really accumulate, because not running code means no new events are posted. The throttling applies to setTimeout/setInterval, and not to any external event (incoming network data, API callbacks, etc).
Sites that legitimately have to do a fixed amount of work per unit time (via timers) will simply do that work with 1 wake-up per minute. All things being equal, this still means less battery usage because energy usage is a function of both wakeups and total CPU usage.
> The primary source of energy savings would be poorly written websites that constantly poll in the background.
This is the key insight here, and really what we're going after. There is a lot of this on the web.