tags:

views:

653

answers:

5

I have a Java Applet application ( achart) on my php Webpage ... Problem here is the Java Applet takes more time to load ... I am thinking of replacing these applets with some similar technology but fast ... I am counting on Ajax... what are my other options ... ?

A: 

If its simple charts you want, have a look at: http://code.google.com/apis/chart/

Tim
A: 

Yahoo has some nice charting components for actionscript 3 (flash) http://developer.yahoo.com/flash/astra-flash/charts/

Google has a service that will generate charts as images as Tim already pointed out.

Alternatively you could try to speed up the delivery of the applets that you are using - check if they have an Expires header so they only get downloaded once in a while instead of for every page (this won't help on the first view, but will speed up those after that)

Edit: if you only target specific browsers you could try and create the charts using javascript and the Canvas element, but that is definitely not supported by internet explorer. https://developer.mozilla.org/en/Canvas_tutorial

Simon Groenewolt
+1  A: 

Have you packed your jars.....

Have you tried Java deployment toolkit (http://blogs.sun.com/vaibhav/entry/java_deployment_toolkit_6u10) with jdk 1.6.10+.....

l_39217_l
+1  A: 

If the size of the applet's JAR library takes to long to download, you can shrink the size with the ProGuard tool. Here is a comparison of the compression ratio for some Java libraries.

axelclk
Thanks , I am exploring it .
+2  A: 

Java applets load slowly. shrug Its the nature of the beast....

If you have multiple jars, you should check the order of the classpath you provide to your applet. Note that each jar is only downloaded "on demand" whenever a class needs to be loaded. It looks in the first jar, if it can't find the class it looks in the second and so on... You can reduce your startup time by ensuring that all of your classes required for starting up the app are in the first jar(s) listed.

Also, if you are attempting to load a class or resource which is not in your classpath, it must search through all the jars before returning AND hit the server codebase to look there. It can potentially greatly reduce your startup time.

Turn on applet tracing in the java control panel and you should get a better idea of how classes are being loaded out of the jars.

Joel Carranza