News for hackers. Stuff that matters.
Re:Canvas vs Canvas vs SVG performance on iPad by hertog on Tuesday March 15, 2011 @12:20PM (#2328149)
I understand what you are saying, but I thought that it wouldn't matter for browsers on mobile devices. I thought that the performance on a mobile device was slow enough to ignore the setInterval limit. Apparently not, since your test gives me a 200fps on my iPhone 3Gs.

However, although the fps is higher, the animation looks worse. Is that because the 'render cycle' is not completed using this technique?

Re:Canvas vs Canvas vs SVG performance on iPad by ck2 on Tuesday March 15, 2011 @12:30PM (#2328183)
It's because browsers render in memory and then periodically update the video display with a "snapshot" copy. Typically this method is fine for the regular content of an average webpage.

But with zeroTimeout, the movement is happening so fast that the snapshot copy is behind. The browser might be only updating the video every 20ms at the fastest, while the block is moving several pixels every few ms.

But be assured the render of the block is completely happening and then being erased. It's a proper render. If it wasn't, you'd get a permanent "smear" of the results in the browser.

Re:Canvas vs Canvas vs SVG performance on iPad by ck2 on Tuesday March 15, 2011 @01:09PM (#2328381)
Just for "fun" I tried (abusing) the blaze.io screencapture service but it's snapshots unfortunately are way too slow

iphone 4.3 http://www.blaze.io/mobile-report/video/110315_1413/110315_1... (mp4)

android 2.3 http://www.blaze.io/mobile-report/video/110315_1414/110315_1... (mp4)