Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reducing the applet loading time

I have an html file which has a jar file included in it as an applet. When ever i am opening the html file its getting too much time to load the applet.

Is there any way by which i can reduce this loading time??

like image 637
Andromeda Avatar asked Feb 23 '10 15:02

Andromeda


1 Answers

There's at three major factors in play here.

1) Java startup time. Cold start used to be 5-10 seconds, however this has changed with the Java quickstarter which was part of the Java 1.6 update 10. This is on by default for Windoes XP and 2000 (Vista offers its own pre-loading mechanisms), but maybe you have this disabled (enable information).

2) The download time for your applet. Test it locally and if the startup time is significantly different consider using better compression techniques. Proguard will obfuscate code and reduce the code size by upto 90 percent. 90Kb shouldn't be slow, but this could depend on your network speed and host.

3) The code you're using to initialize the applet. You could temporarily change your init method to just show a hello world button to identify if that is a problem. If you're not happy with the performance you may need to profile your code.

Applet startup time should be around a second (excluding download time). Check you have a fairly recent Java and try a simple Hello World applet.

like image 99
Pool Avatar answered Sep 23 '22 19:09

Pool