Flash Performance on Mac OS X
In addition to the principled concerns outlined above regarding Flash being proprietary, there are also practical issues. One, Flash’s aforementioned crashiness on Mac OS X. Second, crashiness aside, its performance on Mac OS X is not as good as it is on Windows. And for video playback specifically, Flash’s performance pales compared to H.264 played through QuickTime. This is not subjective. My machine is a two-year-old MacBook Pro. It plays full-screen H.264 video through QuickTime without problem. When I play full-screen Flash video, my fan kicks in within a few seconds, every time.
I’ve been hard on Flash Player for Mac OS X, but this performance situation is not entirely in Adobe’s hands. On Windows, Flash makes use of hardware decoding for H.264, if available. On Mac OS X, it does not. This is one reason why Flash video playback performs better on Windows than Mac OS X, and also why H.264 playback on Mac OS X is better through QuickTime (which does use hardware decoding).
According to Adobe, though, this is because they can’t. Here’s an entry from their Flash Player FAQ:
Q. Why is hardware decoding of H.264 only supported on the Windows platform?
A. In Flash Player 10.1, H.264 hardware acceleration is not supported under Linux and Mac OS. Linux currently lacks a developed standard API that supports H.264 hardware video decoding, and Mac OS X does not expose access to the required APIs. We will continue to evaluate when to support this feature on Mac and Linux platforms in future releases.
Adobe platform evangelist Lee Brimelow recently posted a weblog entry addressing this:
But let’s talk more about the Flash Player on the Mac. If it is not 100% on par with the Windows player people assume that it is all our fault. The facts show that this is simply not the case. Let’s take for example the question of hardware acceleration for H.264 video that we released with Flash Player 10.1. Here you can see some published results for how much the situation has improved on Windows. Unfortunately we could not add this acceleration to the Mac player because Apple does not provide a public API to make this happen. You can easily verify that by asking Apple. I’m happy to say that we still made some improvements for the Mac player when it comes to video playback, but we simply could not implement the hardware acceleration. This is but one example of stumbling blocks we face when it comes to Apple.
I’m aware of no reason to dispute this. Windows is more hospitable to a third-party runtime like Flash than Mac OS X. I think most would agree that Apple is an opinionated company (to say the least), and they make opinionated products. The runtimes Apple cares about are Cocoa and WebKit. The Apple way to play H.264 is through the QuickTime APIs (and really, as of Snow Leopard the new QuickTime X APIs), not to write your own H.264 playback code that seeks to directly access hardware accelerators.
You can argue about why Apple has taken this stance. One could argue that it’s pragmatic — that Apple doesn’t allow third-party software access to things like hardware H.264 acceleration because it seeks to maintain a layer of abstraction between third-party software and the underlying hardware. One could argue that it’s political — that Apple is happy to make Flash look bad performance-wise because Flash is competitive with Apple products in several different regards. (E.g. you may wish that Hulu, which is entirely Flash-based, worked on your iPhone and worked better on your Mac. Apple wishes that Hulu’s content was going through the iTunes Store.)
I would argue that it’s both — that Apple’s distaste for Flash Player is both a matter of engineering taste (that third-party software should only have access to high-level APIs) and politics. But objectively, regardless of what you personally wish Apple would do with regard to Flash, if Adobe needs Apple to grant them further access to the hardware to make the Mac version of Flash Player better, what are the odds that they’d get that sort of low-level hardware access on the iPhone OS? (Hint: zero.)
I’ll leave the last word to Apple COO Tim Cook, who a year ago said, “We believe in the simple, not the complex. We believe that we need to own and control the primary technologies behind the products we make, and participate only in markets where we can make a significant contribution.”
Flash is owned and controlled by Adobe.