6 ms·
Curious that Canvas rendering is so much slower / causes more load than the HTML backend, at least for me. Anyone know why?
by rudd 16y ago
Curious that Canvas rendering is so much slower / causes more load than the HTML backend, at least for me. Anyone know why?
- deleted 16y ago[deleted]
- al_james 16y agoBecause using Canvas requires you to manage redrawing the entire scene each frame in javascript. When using DOM based sprites, the browser takes care of the redrawing whenever you move an element (e.g. a spite).
- chipsy 16y agoIt's also a display model problem. A big bitmap that you draw on arbitrarily is just harder to optimize than a decomposable scenegraph. This downside of Canvas also means it may become a dead-end for high-performance 2D, unless we discover some way of making all manipulations go completely on-GPU. Canvas is presently best suited for creation of individual textures and sprites, while other methods(CSS, SVG, WebGL) are better to render and transform them.
- csytan 16y agoI don't think this is the whole story, because DOM manipulations are also very slow.
- csytan 16y agoOn the about page it says: Performance The HTML backend has received a particular attention to be as efficient as possible.