Live data from Hacker News

"HTML5" versus Flash: Animation Benchmarking

themaninblue.com

11–20 of 24 posts

Re: "HTML5" versus Flash: Animation Benchmarking

#11
Going with the 500 particles / shadows on, link, I get results like these on Firefox 3.6.2 on Windows 7:

    666   Flash
      3.5 SVG (but I did not see shadows)
          Actual rate for SVG looked more like 0.2 FPS
     13   Canvas
I wonder if the Flash is hardware accelerated? I have a beefy graphics card, an AMD 5870.

For Chrome, the results are quite different:

    110   Flash
     43   SVG (still no shadows)
     14   Canvas
With the unadorned links:

     17   HTML/Chrome
     14   HTML/Firefox (between 25 and 14, GC? pauses)
     85   Canvas/Chrome
     40   Canvas/Firefox
     40   SVG/Chrome
      3   SVG/Firefox (again, looked more like 0.2)
    100   Flash/Chrome
    666   Flash/Firefox

Re: "HTML5" versus Flash: Animation Benchmarking

#12
post #5

Earlier quoted context omitted.

I actually had the 'pauses' on Windows using Firefox 3.6 as well. So it's not 100% cut and dried - but, I think his conclusion (use Flash, but Canvas is a growing alternative) is good.

I think his conclusion should be taken with a big grain of salt, because, if you look ahead, to the inevitable future, Flash will probably not be anywhere close to as big an actor as it is today, while Canvas will without doubt grow and grow. But I guess if time stood still, which seems to be the case with most Flash protagonists.....

I'm not sure anyone is arguing Flash will be better forever, it's just at the moment everyone is getting excited about Canvas even though it's not a viable replacement in most situations yet.

Re: "HTML5" versus Flash: Animation Benchmarking

#13

I noticed something off - in Chrome on the Mac Flash never dropped below 40 fps while canvas and SVG never went over ~25 fps, but perceptually it seemed things are the other way around - canvas and SVG animations seemed smoother than Flash. Has anyone else noticed anything similar?

I noticed the same thing. I was getting ~70fps in the flash version, but it looked like it was stuttering and dropping frames. Try the link at the bottom that's rate limited to 25fps. It appears very smooth.

Re: "HTML5" versus Flash: Animation Benchmarking

#14
post #11

Going with the 500 particles / shadows on, link, I get results like these on Firefox 3.6.2 on Windows 7: 666 Flash 3.5 SVG (but I did not see shadows) Actual rate for SVG looked more like 0.2 FPS 13 Canvas I wonder if the Flash is hardware accelerated? I have a beefy graphics card, an AMD 5870. For Chrome, the results are quite different: 110 Flash 43 SVG (still no shadows) 14 Canvas With the unadorned links: 17 HTML…

Flash does have hardware acceleration support, but it wouldn't be helping in this situation. It actually makes things slower in most cases apart from video playback.

Re: "HTML5" versus Flash: Animation Benchmarking

#15

I took a look at his Javascript code, in the "HTML" example, and it was far from as well written as it could be - I could easily do the same effect with a whole lot better framerate. I am not sure how fair a test this is.

Would you like to go into specifics and teach us something?

Re: "HTML5" versus Flash: Animation Benchmarking

#16
Interesting to see the variety of results people are getting here. If anyone is using the Flash 10.1 beta they'll probably find the tests never get above 60FPS due to alterations in the timing system from previous versions.

The one slightly misleading thing about this test case is I'm pretty sure canvas would fall behind quite quickly with a scene with more complicated shapes (understandably so, you have to call JS functions to redraw everything every frame, whereas in Flash you could draw once and then move objects around and let the renderer deal with it without the overhead of calling the drawing functions every time).

Re: "HTML5" versus Flash: Animation Benchmarking

#17
post #16

Interesting to see the variety of results people are getting here. If anyone is using the Flash 10.1 beta they'll probably find the tests never get above 60FPS due to alterations in the timing system from previous versions. The one slightly misleading thing about this test case is I'm pretty sure canvas would fall behind quite quickly with a scene with more complicated shapes (understandably so, you have to call JS f…

Exactly

something like this www.audiotools.com would not even be possible in canvas me thinks.

Re: "HTML5" versus Flash: Animation Benchmarking

#20
post #11

Going with the 500 particles / shadows on, link, I get results like these on Firefox 3.6.2 on Windows 7: 666 Flash 3.5 SVG (but I did not see shadows) Actual rate for SVG looked more like 0.2 FPS 13 Canvas I wonder if the Flash is hardware accelerated? I have a beefy graphics card, an AMD 5870. For Chrome, the results are quite different: 110 Flash 43 SVG (still no shadows) 14 Canvas With the unadorned links: 17 HTML…

Athlon1.1GHz with 768MB running Kubuntu:

FF+html: 2.5; +canvas: 4; +svg: 1; +flash: 15fps

Post reply on HN