Tuesday, November 4, 2008

Binary Reduction of your application

Refer the forum Nokia tutorial here : Optimization

Compression for EXE's and DLL's is enabled by default for 3rd edition
sdk's. Thats why you are seeing no diffrences in you application
sizes. There are various options that you can try:

1. You can tweak compression method used. Usually its Deflate for Code
and Huffman for data. However i doubt you will be able to reduce your
exe size much.
2. Try turning on optimizations on GCCE compiler. It will generate
smaller code at cost of speed. Have a look at
http://wiki.forum.nokia.com/index.php/Changing_the_GCC-E_optimization_level_to_speed_up_your_application.
3. Try using ARM compilers. They generate very small and relativly
faster builds. I had aboute 4 times reduction in my dll size just by
compiling my code over it.

Apart from above mentioned techniques you can tweak your code to
achieve smaller builds:
1. Dont use unnecessary headers in cpp's as they may generate static
literal strings contributing to the size of your code.
2. Minimize macro's/inline functions usage.
3. And as always MODULARIZE your code.

Thanks to VJ.