Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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).

share|improve this question

3 Answers 3

up vote 1 down vote accepted

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

share|improve this answer

only load in memory what you are actively using, when done, release the resource, to free memory.

share|improve this answer

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..)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.