Page 1 of 1

Slow startup?

Posted: 02 Apr 2021, 06:42
by javaapp
Our internal test users are noting a noticeable delay in starting up our app vs JWS. After the Karakun banner appears and disappears it can take 30-40 seconds for the application to startup. Note that this delay would be acceptable if the user was presented with some kind of "Please wait" notification.

Note also that our jars are signed.

I noticed this thread (below) which seems to be more about having a large number of jars in the app (95), while our app has only 2. Also we have logging disabled on the user machines so it is not a logging issue.

viewtopic.php?f=21&t=51

Is there anything we can do to speed up load time or alternately to display a "Loading" indicator? Thanks!

Re: Slow startup?

Posted: 02 Apr 2021, 21:13
by javaapp
I was mistaken in my initial report; the startup time is not 40 seconds but more like 14 seconds. This is still much slower then Java Webstart which startup up within 1-2 seconds - basically instantaneously as far as user perception goes because it is fast and because there always seems to be something indicating progress shown onscreen.

I tried 3.0.0-alpha2 and saw a great improvement: 4 seconds to load (timed from the disappearance of the "Karakun" splash page)! Congratulations, that is a nice improvement.

Questions:

1. Is there a timeframe for the 3.0.0 release?
2. I see that a 1.4.0 release is due next month; should I expect any improvement in startup time in the 1.4.0 release?

Re: Slow startup?

Posted: 05 Apr 2021, 23:49
by javaapp
Elapsed time from disappearance of "Karakun" splash to our app appearing, for various OWS versions (in seconds, approx)

1.2.1 -> 5 secs
1.2.2 -> 5 secs
1.3.0 -> 17 secs
1.3.1 -> 15 secs
1.3.2 -> 15 secs
1.3.3 -> 14 secs
3.0.0-alpha2 -> 4 secs

Notice the big jump starting with 1.3.0 - is this a known/expected issue?

Re: Slow startup?

Posted: 06 Apr 2021, 00:35
by javaapp
I'm stepping through the initialization code in IcedTea-Web and it seems like there is a 12 second delay in the line indicated below in JNLPPolicy.java where it calls getInstance(). The policyLocation string looks like "file://C:\Users\username\.config\icedtea-web\security\java.policy". Any ideas how we can reduce this delay? Thanks (sorry for the continual information dump on this post; I'll pause now and wait for a response).

Code: Select all

    private Policy getPolicyFromUrl(String policyLocation) {
        Policy policy = null;
        if (policyLocation != null) {
            try {
                final URI policyUri;
                if (policyLocation.startsWith("file://")) {
                    policyUri = new URL(policyLocation).toURI();
                } else {
                    policyUri = new URI(policyLocation.replace("\\", "/"));
                }
                
                policy = getInstance("JavaPolicy", new URIParameter(policyUri));  // <===== Takes 12 seconds!?
                
            } catch (IllegalArgumentException | NoSuchAlgorithmException | URISyntaxException  | MalformedURLException e) {
                LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, e);
            }
        }
        return policy;
    }

Re: Slow startup?

Posted: 12 Apr 2021, 15:34
by Stephan Classen

Re: Slow startup?

Posted: 20 Apr 2021, 18:29
by Janak Mulani
Hi,

I would like to know if you have specified deployment.system.security.policy property in your deployment.config file. If yes can you please share your deployment.config file?

Thanks

Janak