You are assuming that the only thing preventing Flash from working on mobile is that it hasn't been "optimized" enough -- that opening the source to Google and Apple will unlock performance otherwise unattainable by Adobe.
But suppose Adobe's programmers are not completely incompetent? Perhaps Flash's execution model is genuinely unable to be optimized further. Or perhaps most Flash content in the wild runs at the limits of desktop performance, and that compositing vector graphics and text on top of video while running multiple VMs embedded in a webpage is just too much for a memory- and CPU-constrained device.
In that case, open-sourcing Flash would have little effect. Even if we had an optimal mobile Flash player, we'd still need everyone to rewrite their Flash movies to run well on it. That's why HTML5 has the advantage here: HTML5 content is being freshly written and tested for mobile platforms.
Rubbish! Most moderately advanced HTML5 demos run hideously, if at all, on mobile hardware.
The difference will be if HTML5 can replace 80% of Flash uses in a performant manner. The video tag makes up a huge block of that 80%. The other 20% will always run like a dog on mobile hardware, no matter the technology.
Have you watched the Apple HTML5 demos on an iPad? It's actually revolutionary to see what they can do with the limited hardware. Being able to touch and drag a 3d model around at 30 fps without stuttering? I can't even do that on a lot of PCs with Flash.
Without examining the code it's hard to jump to conclusions, was the flash version really rendering the effect pixel by pixel as I'd imagine the HTML5 one is?
I've got a quad core Win7 box with 4gb of RAM and a video card that runs Fallout3 at max settings on my 23" monitor without even noticing.
Or So They Say only advanced frames in Firefox when I moved my mouse. It actually ran for me in Chrome, but was pixelated (2x?), and still laggy (I'm guessing <24fps)
While it's cooler than anything I've ever done with javascript, I was watching more impressive demos on a Pentium 75 over a decade ago.
HTML5/Javascript/etc. appear to have a long way to go, performance-wise, before they catch up to Flash. And by the time it catches up to Flash 10, where will Flash be?
I ran two three minute tests, one in Safari and the other Firefox on a 2.8GHz C2D w/ 4GB RAM and nothing else really open.
In Safari 5.0.1 your link didn't render a single frame in three minutes.
Firefox 4b3 did render, but the animation would not normally be watchable. The opening scene ran the best, probably around 15fps while during second and third scenes the galaxies would jump about an inch with each frame. I don't know what the fps were, but it was updating the screen less than one time per second with a single core maxed out.
Also, on launch, FF was using 76MB of RAM yet after the three minute test it was using 168MB of RAM.
So your link didn't function in one browser, used 2.8GHz of processing power and ~90MB of RAM in another yet was completely unwatchable.
Well, the demo is an amazing demonstration of HTML 5, and the limitations of HTML 5...if your browser can swing it. It runs pretty great in Chrome, not so great in FF and sucks everywhere else.
What if this were a Flash demo? Only be mildy interesting -- and that's only for the presentation itself. From a technology perspective it'd be ho-hum.
I think more important than that is that it's not even interactive. Interactivity with HTML 5 apps has light years to go compared with Flash even if browser vendors can lick the performance problem.
In other words, HTML 5 as a content delivery platform has a very long way to go...and as it is is certainly not anywhere near as a cross platform as Flash is. It's just not a swap out substitution for Flash yet and forces developers to produce software that's just simply not of the same quality as Flash is able to handle.
We're talking about Google, a company who wrote their own cleanroom Java implementation and reverse-engineered ActiveX to create a ChromeFrame implementation still compatible with anything that ever worked in IE. I think they could speed things up a bit.
ActionScript is just JS plus some extra sugar. JS implementations have gotten hundreds of times faster in the last three years, while Flash has gotten slower. Slap a modern JIT on there and we should get some improvement.
A lot of what goes on in SWF files is the art data (vector graphics, the 'movieclip' object, etc). Flash comes with a pretty extensive API for manipulating graphics and these objects, all which needs to be rewritten for mobile. There's a lot there, believe me.
Unfortunately, much of that content is what causes the problem. Using the artist tools (Flash CS3), you can generate content that simply fumes memory, without writing a single line of code. I'm not sure you can even fix those issues without re-authoring the art content.
What makes this worse is that anyone can embed one of these crappy SWFs in a webpage, causing the browser to fume memory too.
> reverse-engineered ActiveX to create a ChromeFrame
Can you elaborate?
> while Flash has gotten slower. Slap a modern JIT on there and we should get some improvement.
Adobe actually contributed to Tracemonkey's JIT as one of their effort towards ECMAScript engine unification, they even planned to write a engine for WSH Active Script, but failed. IMHO Flash is laggy because of the drawing part, but in this case HTML5 is also laggy as hell. Try set font to 100 in this demo:
> JS implementations have gotten hundreds of times faster in the last three years, while Flash has gotten slower.
I don't know about that. Flash may be proprietary, poor coding community, etc, but to suggest it is creeping down to JS performance is pretty outlandish.
Flash has two communities. One: Designers trying to do timeline animation with a mix of code snippets they've found. Two: Decent coders who implement the safest, best methods.
When Flash performance is subject, it tends to be Flash's poor design that gets the bad rap even though it tends to be the poor developer community at fault. In the same way, JS-based interactive content can also be coded poorly and perform poorly as a result.
Honestly, I've seen some pretty intense, balls-to-the-wall sites that I know would absolutely work at a crawl or snail's pace in JS, but work elegantly in Flash.
A full open-source file format would be a great move for Adobe.
ActionScript is not JS plus sugar. ActionScript 3.0 adds statically-typed variables and class-based inheritance. A good compiler can use these additional constraints to produce better code -- performing more like Java than JavaScript. It's possible that the VM is not the bottleneck here.
I don't think Flash's problem is speed. It could be sped up by 10x and I don't think it would significantly matter to its market position or future prospects.
But suppose Adobe's programmers are not completely incompetent? Perhaps Flash's execution model is genuinely unable to be optimized further. Or perhaps most Flash content in the wild runs at the limits of desktop performance, and that compositing vector graphics and text on top of video while running multiple VMs embedded in a webpage is just too much for a memory- and CPU-constrained device.
In that case, open-sourcing Flash would have little effect. Even if we had an optimal mobile Flash player, we'd still need everyone to rewrite their Flash movies to run well on it. That's why HTML5 has the advantage here: HTML5 content is being freshly written and tested for mobile platforms.