3 ms·
You actually can, via (ab)using requestAnimationFrame. It's been a while since I did front-end development, but back in the day (...okay, 2014 ish) we'd batch D
by PeCaN 10y ago
You actually can, via (ab)using requestAnimationFrame. It's been a while since I did front-end development, but back in the day (...okay, 2014 ish) we'd batch DOM reads and writes, run through them the next time the frame was painted, and avoid multiple redraws. It was rather cumbersome, especially since reads had to be asynchronous, but it was fast.
- mpeg 10y agoI'm a big fan of the Mithril MVC framework, it does some pretty smart autoredrawing [0] while still allowing you manual control of when things are drawn if needed [1] [0]: http://mithril.js.org/auto-redrawing.html http://mithril.js.org/auto-redrawing.html [1]: http://mithril.js.org/mithril.redraw.html http://mithril.js.org/mithril.redraw.html