Introducing JITB — a Flash Player Built On the JVM 126
MBCook writes "Joa Ebert has started working on a new program called JITB. Announced in a talk at FITC San Fran, it's a Flash player written to use the Java JVM to run ActionScript, and in a simple graphics test case (making 1 million calls to flash.geom.Point) was 30x faster than Adobe's Flash player. There is an impressive demo video on YouTube showing the point test."
30X faster? (Score:5, Informative)
From his site:
Update: Please do not think that this implementation is 30x faster than the Flash Player developed by Adobe. One(!) microbenchmark is never a number you should count on. I would like to make clear that I never said this.
Re:Ironically... (Score:3, Informative)
Also available via html5/h.264:
Enable html5 playback @ http://youtube.com/html5 [youtube.com]
Adobe has one (Score:5, Informative)
Adobe (back then Macromedia) used to ship Flash in two version: native binary and Java version in the days when Java applets were popular. They stopped developing it around the time Flash 4 was out, because the tables have turned: Java applets were going down, while Flash was going up.
The article never mentions any reason as to why this player was developed, and I'm struggling to come up with a reason myself, as it's easier to port the native runtime to any platform, than maintain an independent copy in a constant "catch up" mode.
Re:Ironically... (Score:4, Informative)
You're almost certainly going to get modded into oblivion for question His Holiness Steve Job's HTML5, but it's worth pointing out that you're absolutely correct, and it's because Flash allows for bandwidth-sensitive downloads and HTML5... doesn't.
Basically, a Flash app can start streaming a movie and see how fast it's connecting at. If it's connecting too slowly, it can switch in mid-stream to a lower bandwidth stream and continue playing as if nothing happened.
HTML5 can't do that.
Strangely enough, QuickTime can do this automatically. But QuickTime isn't HTML5, and so if you're serving up an MP4 file so that it plays in both Chrome and Safari, well, you won't get that feature. You have to create the special QuickTime specific index MOV file, and that can only be done using QuickTime Pro.
Which, incidentally, is what you're "supposed" to do when serving content for the iPad and iPhone.
Re:BSD (Score:1, Informative)
Which BSD and 64-bit Linux do.
Re:Ironically... (Score:2, Informative)
I am not sure why flash is considered so slow for many of you.
I am using a laptop from 2006 and I never had any real speed issues, that is unless I have a bad connection nor have I noticed it justs sucking up my CPU usually a spike then it resolves itself.
Could it be that.
1. Some places write bad code for flash.
2. Your bandwith is sub optimal
3. You using a computer from the Clinton Administration
I found that flash runs just as well as any other interpreded languge in terms of speed and perfomance. No it is not like it is imbedded into your OS. But it has been getting the job done.
JVM optimisations (Score:4, Informative)
The article never mentions any reason as to why this player was developed, and I'm struggling to come up with a reason myself
I would think that the JVM itself is the main reason.
Flash uses Actionscript, a variant of ECMAScript, just like Javascript.
To run it fast enough, an implementation needs a fast and nice actionscript engine.
One possibility would be to get a Javascript engine like Google's V8, Mozilla's Trace- / Jaegger-Monkey, Adobe's own opensourced Tamarin, etc.
The other possibility is to use a well known and well optimised VM like Java and compile the Javascript into Java bytecode. This makes the process more complex, but leverages the years of JVM development.
Also the second advantage is that lots of hardware contain already a functionning JVM : Lots of phone have Java EE, Android has the Java-like Dalvik (which can run java byte code after a transcoding), etc.
as it's easier to port the native runtime to any platform
Saddly, the main reference implementation of Flash is closed source (except for the Tamarin engine).
So for a port you have 3 possibilities :
- wait for Adobe to port the latest official player. Saddly they aren't doing it for lots of different architecture
- port yourself one of the open source implementation (Gnash, LightSpark, Swfdec)
- use a multi-platform player (Java)
Re:Ironically... (Score:1, Informative)
Re:Ironically... (Score:1, Informative)
Are you just making stuff up? In my experience Silverlight is much faster than Flash.
Re:JVM optimisations (Score:2, Informative)
"The JavaScript compiler translates JavaScript source into Java class files. The resulting Java class files can then be loaded and executed at another time, providing a convenient method for transfering JavaScript, and for avoiding translation cost."
http://www.mozilla.org/rhino/jsc.html [mozilla.org]