Bestpractices to reduce .prg size

Hello,
I'm developing a very simple widget with CIQ1.2.1.
A simple widget saying "HelloWorld" has a size of 38Kb once compiled.

On the market, there are widgets of 10Kb that do more complicated things.

I've been testing removing resources.xml, strings.xml, etc. and I can reduce the amount of memory used during the execution, but not the size of the compiled version.

- Are there some tricks on the Eclipse environment to reduce this size?
- Could you explain some bestpractices ?

Thank you!! :)
  • When you compile for the simulator or for sideloading, it's a debug version (though "build for device" allows you to build a release version). The debug version of something is much larger because it includes all the debug symbols, etc.

    The key is to look at the memory on the bottom line of the simulator to see how you're doing memory wise. and if you're concerned about the size of the .prg itself, make sure you're looking at a release build.
  • Between memory and file size, what should we be worried about? For example, I have a widget I'm preparing for release and it shows 18.8K in the simulator and 49K for the file (the .prg file built by the Eclipse Build for Device Wizard).

    Are there any suggestions you have for best practices? For example, I thought it cleaner to have separate View and Delegate objects for each device (e.g., Fenix 3 vs FR920XT), however maybe this is bad from a file size/memory perspective.
  • Former Member
    Former Member over 9 years ago
    File size is not really something you need to worry about. There is a limit for the size of all installed files on the device, so if your file size is enormous, it might run users out of app space, but the only thing the VM cares about is the amount of memory that is used when the app is active.