Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java Applet Size Reduction

Posted on 1998-09-19
5
Medium Priority
?
240 Views
Last Modified: 2008-01-16
I'm desperate to reduce the size of my Java Applet.  I have taken all the measures I can think of (Jar & cab file formats, snipped all dead code, using a "Release" (not debug) build, etc), but I'm wondering if there's something non-obvious that I could do to my code that would reduce it's size?
0
Comment
Question by:sniles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:sniles
ID: 1224631
I think you misunderstood my question.  I am trying to reduce the size of the JAR, CAB and ZIP file containing the class files.
0
 
LVL 2

Expert Comment

by:triso
ID: 1224633
Hi,

Exactlly how large is "too large?"  Do you have lots of small class files or just  a few large ones?


0
 

Author Comment

by:sniles
ID: 1224634
I have several large classes, then about a dozen smaller ones.  Ideally, I'd like to reduce it's size by 20%.  It's currently about 120kb uncompressed, about 54kb when compressed in a .cab file.  If I could get a 30kb .cab file, I'd be quite happy.
0
 
LVL 3

Accepted Solution

by:
mjenkins earned 100 total points
ID: 1224635
I assume that the reason you are asking is to reduce the download, and thereby startup, time. May I suggest that if you've already optimised as best you can, split the cab/jar/zip files into smaller units. Use the -verbose option to watch the order that classes are loaded when your applet is running. Then split the cab files up so that your initial download is as small as possible to get something on the screen.

Typically, users are much more inclined to cut you slack (time-wise) once they see the first screen.
0
 

Author Comment

by:sniles
ID: 1224636
So you're saying that splitting up the cab/jar/zip files will allow the applet's screen elements to display prior to the point when the "Applet Started" message?  I have noticed that during the loading, the "Applet loaded" and "Applet initialized" messages are output (in the Java Console), then several more classes are loaded, then the "Applet Started" message is finally displayed.  To display the screen earlier, I can cut those classes that follow the "Applet Initialized"  off into a seperate jar/cab/zip? and just add that zip as a second archive= param, and a second <param name=cabbase value="myapp1.cab,myapp2.cab">  ?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question