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??
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With