- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Sun, 06 Sep 2009 11:11:36 -0400
Marius Gundersen wrote: > I've been playing around with the canvas element, making a 3D engine. It > works, but is incredibly slow. Part of the reason is probably that the > browser renders the canvas everytime I draw something to it. Depends on what I mean by "renders". Anything you draw to the canvas is rasterized (converted to pixel information from the vector instructions you give the canvas) immediately. It's not actually painted to the screen until sometime later; certainly not before your JS finishes executing. Not having seen your code, I would bet that your issue is doing lots and lots of tiny paint operations that involve a good bit of rasterization overhead... If your code is publicly available, I can probably give you more specific details than that if you point me to it. -Boris
Received on Sunday, 6 September 2009 08:11:36 UTC