Common wisdom has it that Flash is a resource hog, and that HTML5 will prevent your processor from having to work really, really hard to show animations of videos. Well, a number of people have conducted benchmarks with the latest browsers and Flash betas, and common wisdom is starting to show serious signs of crackage.
The next big thing in the Flash world, and more or less Adobe’s answer to all the complaints about Flash’s performance, is version 10.1. It brings with it general performance improvements, but more importantly, enables hardware acceleration for video playback – at least on Windows. The feature isn’t supported on Linux, because, well, let’s face it, Linux’ video and graphics stack is a mess, and it isn’t supported on Mac OS X because Apple doesn’t expose the hooks to do so.
The difference hardware acceleration makes for playing video content through Flash is pretty big: with hardware acceleration enabled (Flash 10.1 on Windows), processor usage drops to acceptable levels right away. According to tests performed by ReadWriteWeb for instance, Firefox running on Windows saw processor usage with Flash 10.1 drop to 6%, down from 22% when using Flash 10.0.
Similar conclusions were drawn by other testers. “When it comes to efficient video playback, the ability to access hardware acceleration is the single most important factor in the overall CPU load,” concludes Jan Ozer, “On Windows, where Flash can access hardware acceleration, the CPU requirements drop to negligible levels. It seems reasonable to assume that if the Flash Player could access GPU-based hardware acceleration on the Mac (or iPod/iPhone/iPad), the difference between the CPU required for HTML5 playback and Flash playback would be very much narrowed, if not eliminated.”
It is difficult to shake the feeling that Apple is purposefully not providing the hooks needed for Flash to tap into the video chip to provide hardware acceleration. Steve Jobs is clear in his hate for Flash, so why would Apple make it easy for Adobe to improve their product?
When it comes to non-video content, HTML5 doesn’t appear to be very CPU-friendly, but since there’s no benchmark available that tests the same set of animations in both Flash and Canvas/JS, it’s hard to compare the two competing technologies. In any case, the 9elements Canvas/JS example is pretty rough on the processor no matter the platform.
The deciding factors on Flash performance is most certainly the availability of hardware acceleration, which at this point is a Windows-exclusive feature because, as AnandTech puts it, “Linux isn’t ready and Apple isn’t open enough”. This means that simply because Microsoft offers the superior video stack, Flash will no longer be a resource hog for Windows users.
The performance of HTML5, whether it be video or animation, varies wildly based on platform and browser, which makes sense since every browser maker uses different codecs and implementations. This means that for at least the foreseeable future, fancy HTML5 content can most certainly be just as, if not more, straining on your processor than Flash content.
This doesn’t mean we should all stop hating Flash now, though. It’s a closed technology filled to the brim with security holes and stability issues. At least for Windows users, performance will no longer be an issue once 10.1 leaves beta.
I am really curious what hardware acceleration they are using that is not available on non-windows platforms. Is this really a matter of platform does not support at all, or is it a matter of they used an API that is only on windows.
While I think just using OpenGL would be good enough for typical flash uses, I can understand them not wanting to use it due to things like lack of control over sub-pixel rendering. Which is why I wonder what they are using on windows. Direct2d would make some sense, but I am wondering if they would want that or go lower level.
Also the linux side is not so weird anymore. As Opera has shown with their use of gstreamer in their newest version, choosing the leading solution is good enough. It will work just fine with all the normal distros, and fringe people can take care of themselves.