Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Curious that Canvas rendering is so much slower / causes more load than the HTML backend, at least for me. Anyone know why?


Because 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).


It'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.


I don't think this is the whole story, because DOM manipulations are also very slow.


On the about page it says:

    Performance

   The HTML backend has received a particular attention to be as efficient as possible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: