Lazy downloads aren't lazy enough
843802Feb 6 2003 — edited Feb 10 2003Hi all, I am having a problem.
Our application that we are developing will come with about 20-25 jar files. Out of these jar files, one will be mandatory, and the rest are optional. Only one of the optional jar files will be required, depending on the options you choose when the application initially starts.
To run the program you will end up only downloading about 2-3 mb. However, the total download of all the possible jar files is over 30 mb.
In order to avoid people having to download 27 mb worth of stuff that they will never need, we have broken our application into lots of small jars, and marked most of them to be downloaded lazily.
The problem I am having is this ... it seems there are 3 phases when Web Start kicks off your application:
1. It examines the jars you have, compared with the jars that are mentioned in the jnlp file, so that it can decide what it needs to download.
2. Any jars that are missing or out of date are downloaded.
3. You application starts
The problem is that marking a jar file as a lazy download, (either directly in the resources section, or by putting it in another jnlp file and marking the external resource as lazy) only seems to affect step 2, it has no impact whatsoever on step 1.
Over a modem on the internet, it seems to take java web start 2-3 seconds per jar file to decide whether it needs to download it or not. In theory, since there is only 1 jar file that is marked for eager download, our application should start in 3 seconds. However, because there are 20-25 jars in total, it is taking over a minute for our application to start.
This is a real problem for us, as taking a minute for an application to start is unacceptable.
For me the ideal behaviour is that any jar marked as lazy should be ignored completely until it is requested, not just during the initial download.
Does anyone have any idea how I can get around this, or should I just raise it as a bug?