users@glassfish.java.net

Re: Very slow start-up of Java Web Start Application Client Container (JWS-

From: <glassfish_at_javadesktop.org>
Date: Tue, 14 Aug 2007 11:30:56 PDT

Hi, Steve.

Sorry for the delayed response. I've just returned from some vacation time.

A minute does seem a bit extreme for a start-up delay.

A few questions:

1. Do you see the same sort of delay when launching the client using the appclient script? I'm not suggesting that as a workaround for your users. I'm just trying to understand better the circumstances when this happens.

2. Does the Windows temp directory contain a large number of files? What JDK version are you using on the client side?

I need to chase down the details again, but in looking into this sort of delay earlier I think I discovered a surprising fact. The ACC must unzip the generated app client JAR file into a temporary directory and it uses the File.createTempFile method to do so. The File.createTempFile method used a random number generator to create the temporary file and If I recall correctly, at least in a Java SE 1.5.x release that method listed the files in the temp directory as part of its randomization. Clearly this can be quite expensive if the temp directory contains many entries. Of course, you mentioned that you are using 1.6_2 and I do not see the same coding in the 1.6 source so perhaps that has been changed.

3a. Would you be willing to use a patched JAR file that would log some of the timings of intermediate start-up steps within the ACC? Unfortunately the ACC does not log timing information currently but this would at least let us pin down where the time is going.

3b. An alternative would be for you to use a profiler - such as the one that works with NetBeans - to capture a detailed profile of exactly where the time is being spent.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=230860