I have a personal project that I'm working on although it's quite audio and graphic-intense and I was wondering if you guys had any suggestions or solutions as to how one could keep the size and memory-usage of their application to a minimum? My application is an iPhone application and, as Apple always make clear, the application is only allowed to use a certain amount of memory (in terms of performance and actual size).
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Start looking for more compression using other formats when dealing with audio and video. Also images tend to have compressed version like jpeg. But if your application need multimedia, it will be quite heavy.
Also maybe try asking the same on stackoverflow forums, there you may find a more expert solution
I do not agree about using compression, i.e. JPG. Preferred format is PNG, and if You use JPG anyway it will be expanded in memory.
So for example reduce size of PNG and draw with small tiles, draw in rects instead all view and do so on.
Use Instruments to see where and how You have big allocations and try to reduce them.
Make all loading "lazy" so you can free resources when done and reload on demand.
As You make a lot of graphics, is fine drawing directly objects, instead of loading images and drawing. (even if apple says is better to load image for performance reason... the trade-off is between processor usage and memory..)
only load in memory what you are actively using, when done, release the resource, to free memory.