JWS Startup Lag

So I have an application that is web start enabled that uses an extension for pulling down about 250MiB of data that is zipped up in a jar file (this is the compressed file size). The first time I launch JWS, I get a loading screen via JWS (pulling down the jars). This is acceptable behaviour.

However, the 2nd attempt at starting JWS, nothing happens for 20 seconds. Then the application starts. I am thinking that JWS is doing some check summing on the 250MiB jar file on the local verse the server but I’m not sure.

Does anyone know how to get my application to start right when JWS does? 20 seconds leaves the user feeling like nothing happened.

Thanks

The only way I’ve found to speed up the time between the user clicking on the JWS app and the application actually to run, is to separate the large data files from JWS and create your own method of pulling this data from the server. Meaning, I don’t let JWS manage any large files because if the checking that JWS does to figure out if the file is new or not.

I wrote a small and simple RMI server/client that handles retrieving large files from the server.

Its been my experiance that JWS is a good way to manage code distribution; however, large directories of binary data such as images/videos/3d art/etc should be managed by your own home-brew client/server model.

In theory, such problems are due to a misconfigured webserver (I’ve seen that be the actual cause of such problems a few times before).

In practice…could well be a bug in JWS.

I suggest you packet-sniff and paste in the HTTP traffic and we can tell you what’s going on and look for any specific problems.

(assuming you’ve already googled this and not found it to be a common problem).

Also … you should NEVER be doing a massive JAR file for a game with webstart- it removes the value of a lot of what webstart is - you should have been doing multiple smaller jars from the start. And you should try just having lots of jars, and letting JWS manage ALL of them.

I was wondering about that (but i don’t have a lot of time for that right now).
So it should be better to have a jar per map / library / mob / … than a single one ? If there is a “lot” of them, will JWS have a hard time to check all the file to see if there is an update ?

There is a bug in JWS in the 1.6 JRE that leads to long startup time due to security checks or something. I haven’t found the entry in the bug database in a quick search, but I remember that it has 1.6u5 as a fix target.

“check if there is an update” == something that happens faster than you could possibly notice, if the webserver is properly setup. This is a trivial operation.

Think what happens every time you change just one line of code. How much do your users have to re-download? that’s why you have many small files not one huge one.

http://bugs.sun.com/view_bug.do?bug_id=6566201

  • elias

Thanks! It explains why it is slower when I launch my game with Windows XP.