This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Optimizing for download size


Does GCJ have an option to aggressively optimise for download or zipped size(*)?

- I'm using Java and Eclipse SWT instead of Visual Basic and there
is one area where Visual Basic scores over Java: download size.

- My application uses JNI in order to use SWT and serial communication(using either 
javax.comm from Sun or www.serialio.com). I'm following the exiting JNI developments 
closely. :-)

- Presumably such "aggressive" size optimisation would need a list
of all classes and maybe even methods actually used by the program. 
I suppose some first approximation could be done by scanning the 
class dependencies starting out from "main", but perhaps running the
app with some instrumentation to generate a "use list" would make
more sense(where the user would be responsible for exercising all
code paths).

* My application will be zipped for download, and I don't particularly care 
how big the application is unzipped. My initial attempt
at using GCJ for a straightforward "hello world" gave me a 2.5MB exe 
file that was 700k zipped. Thats pretty darn good! 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]