4 ms·
RequestAnimationFrame[1] would solve that, however it wouldn't trigger in the background, which may, or may not be wanted. [1]: http://www.paulirish.com/2011/r
by edwinvdgraaf 13y ago
RequestAnimationFrame[1] would solve that, however it wouldn't trigger in the background, which may, or may not be wanted.
[1]: http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/ http://www.paulirish.com/2011/requestanimationframe-for-smar...
- masklinn 13y agoProbably is actually, I'd expect there's little need to update the list if said list is not being looked at. On the other hand, it might be fairly costly while the system is being watched as it will fire (and do some check) on every single frame.
- tantalor 13y agorequestAnimationFrame may be too frequent in the foreground (could effect performance?), and not necessarily 0 in the background. That repaint may occur up to 60 times per second for foreground tabs (the exact rate is up to the browser to decide), but may be reduced to a lower rate in background tabs. https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/window.requ...