<< SSH Filesystem | Home | Reclusive Russian Turns Down Fields Medal >>

The First Thing I Would Do When I Get My Hands On Open Source Sun-Java ...

... is to kill the startup delay!

Tim Bray: But while I’m debugging it I’m eating the startup delay all the time, and at the moment, it’s brutal; I mean seriously bad. The JRuby guys have been doing some pretty bold chest-beating about how fast JRuby’s gonna be—bolder than I’d be in their position—but at the moment it’s kind of sucky to develop in.

The Java start-up time is the number one ill of the whole Java phenomenon. This single fault killed the Java applet concept, and spawned the application server market: "Hey, that Java thing starts so slowly, why don't we pre-start a Java process, and cramp all of our applications into that one instance."

It really is unforgivable that after ten years, we are still suffering from the slow-start-ness of Java.

I have a 2.0GHz processor, 1GB RAM, and a 80GB hard drive (A bottom of the line laptop as of July 2006). I want my Java start up time to be cut down to a point where I can't feel it.

Make it go on stand-by mode. Make it hibernate to a 500MB file. Compile the darn thing down to native code (I've JIT it the whole thing millions of times.) Turn off verification (I've verified the whole thing a million times.)

Something can be done, can it?

P.S. I said Open Source Sun-Java instead of Open Source Java because there are already two major Open Source Javas out there: The GNU gcj which ships with Fedora Linux since Core 2, and Apache Harmony, which is shaping up to be a fantastic Java implementation.

Some would say they are not complete and don't pass the compatibility test. And guess what, the Open Source Java that Sun will release won't be complete either. They are releasing pieces of it at a time. And won't contain the whole thing that constitute the current day JDK when they are all done with it early next year.

Tags :


Re: The First Thing I Would Do When I Get My Hands On Open Source Sun-Java ...

real bottleneck of the mobile computers is Hard drive when it comes to speed of starting an application. do you know the RPM of your 80G drive? let me guess, a sucky 4600? Second one is the memory speed which also sucks in mobile computers. Anyhow. Java6 is pretty good in startup time, give a try.

Re: The First Thing I Would Do When I Get My Hands On Open Source Sun-Java ...

Saving the code cache is tricky, JRockit tried it, failed, ended up backing out the feature.

But this will be supported by all the vendors at some point in the future. It's necessary for the survival of the platform.
And remember, Sun is the *only* VM provider that cares about "client" app performance, no one else does. Not BEA, Not IBM, Not HP. No one. (Ok ok, Apple may the exception but that's probably because Java is much slower on their OS).
The holy grail for Java is native app startup speed, and we're a long way from that ...

Needless to say, IBM's answer is Eclipse.
btw, you can turn off verification with -Xverify:none .

Re: The First Thing I Would Do When I Get My Hands On Open Source Sun-Java ...

aargh, another "well intended" hack which will muddy the waters for consumers as to what Java is. How much will you need to change the language specs or bytecode format to make it work nicely? Almost certainly enough that it won't work with existing code, and boom another imcompatible JVM called Java hits the street to confuse the unwary who'll immediately complain that Java is bad because they can't run their programs on it.

What keeps you from doing it today?

What keeps you from doing it today? The entire source code, including the jvm, hotspot etc is all there for you to provide improvements to right now, and has been for quite some time. They are even asking you to do it. It's easy too. Turning off verification after having it done once is like checking for virus on your computer once, not find any, and then come to the conclusion that you never need to do it again :) Shared jvm instance and stand by etc would be nice though. Since java 5 it already partly reads a big file into memory directly, after the first start up, and by doing so it skips a big (time wise) step of class loading. /mattias jdk 6 contributor

Progressive mode ?

Ok, why not having a "progressive mode". I mean, let's start in full interpreted mode until the first visual component is displayed on the screen or after 2 second after the startup. If an application is slower at startup than 2 sec then there is nothing to do but to display the animation (for applet) and push full throttle (hotspot at the max !). Also, caching the verified class would realy help on this one. Any comments ?

Re: The First Thing I Would Do When I Get My Hands On Open Source Sun-Java ...

So true about applets. Say what you may but even complex Flash apps start up nearly instantaneously, and this is one major reason why Flash is all over the place and Java applets are for computer science professors and java.net webloggers only.

Add a comment Send a TrackBack