This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

optimize download class file

 
kannan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi can anybody give me a suggestion or tool which will minimize my intial downloading time of java class file. now it takes more than 8 minutes for intial download. i will be grateful if some body helps me out at the earliest.
------------------
Kannan.S
 
paul wheaton
Trailboss
Pie
Posts: 21378
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you jarring your files?
You might want to consider getting dash-O from preemptive.com. The company I'm working for now is getting it for a similar problem. It figures out what your applet needs and doesn't need and tosses out the rest: classes, methods, attributes ... Then it obfuscates the code so that long identifiers are turned into one or two characters. They claim up to 70% compression of a jar file. Oh yeah, jarring your file is going to cut way back on the download time of your stuff cuz for every class an HTTP session is opened up. HTTP connections are expensive.
Another thing: are there parts of your program that are not run at the very beginning? You can split your code into several jar files. One that is used at the beginning and others that supplement later. This way, to get your applet started you might only need to download 20% of your program - then while your program is already running, the other 80% is being downloaded in a seperate thread.
 
Jack Shirazi
Author
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul's complete answer left only one thing out, that the jar file should also be compressed. This compression is different and complementary to the compression achieved by Dash-O.
Applets should have their download performance strongly considered at every stage of the applet development, from the specification stage. In my book I analyze how leaving performance considerations later for applets can make a huge difference in the cost of improving the performance of the applet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic