Hints for minimizing size of app?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sylvanr
Posts: 80
Joined: Wed Nov 24, 2010 10:38 am

Hints for minimizing size of app?

Post by sylvanr » Fri Jul 22, 2011 5:26 pm

I have been working on an app that has quite a few photos and animated gifs and I am noticing that it is up to 9.9 mb which I think is pretty big. I am wondering about ideas to knock the size down? With the animated gifs, I am currently using 256 colors. With the photos, I'm saving them as medium size jpegs & then copy and paste them into the cards. They don't have to the highest quality jpegs but I don't want them the lowest quality either. I am not sure how much of the size is the coding or buttons themselves but I imagine most of the bulk is from the graphics? Any ideas on tightening this up a little and slimming down my app? Is size affected by the "saving as application" for distribution process? Suggestions?

I am also curious if there is a point at which others feel that an app is too big to be practical on the iPhone?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Hints for minimizing size of app?

Post by Klaus » Fri Jul 22, 2011 6:20 pm

Hi sylvanr,

well, 10 MB is really not much for a "modern" app :D

Some hints:
Gifs are OK with 256 colors!
Save the JPG images in the SAME size as they appear on the cards!
Then do NOT copy/paste them, but instead import them via menu:
File: Import as control -> Image file...
Scipts are just a bit of text, so this is not a problem!

Best

Klaus

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Hints for minimizing size of app?

Post by jacque » Fri Jul 22, 2011 6:37 pm

A bare-bones app for iOS comes in at about 1.5 megs. The size you are seeing is mostly due to your images, probably. The engineers at RR have said that it is not a good idea to import all images into the app, the OS is optimized to retrieve images from disk. My advice would be to import only a few images that you need to use for icons or other appearance purposes, and leave all the others in a folder that will be included with your build. Reference the images instead of importing them. You'll gain speed, memory, and your app will be smaller (though the total size of the bundle won't appear to change, since you have to include your images regardless.)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Hints for minimizing size of app?

Post by Klaus » Fri Jul 22, 2011 7:22 pm

jacque wrote:...The engineers at RR have said that it is not a good idea to import all images into the app, the OS is optimized to retrieve images from disk...
AHA! Good to know :D
Thanks!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Hints for minimizing size of app?

Post by jacque » Fri Jul 22, 2011 7:30 pm

Klaus, I only posted to prove to you that I read the topic title 3 times before I answered, just to make sure I was talking about the right OS. :D
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sylvanr
Posts: 80
Joined: Wed Nov 24, 2010 10:38 am

Re: Hints for minimizing size of app?

Post by sylvanr » Sat Jul 23, 2011 7:43 am

Thanks for the tips!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Hints for minimizing size of app?

Post by Klaus » Sat Jul 23, 2011 11:17 am

jacque wrote:Klaus, I only posted to prove to you that I read the topic title 3 times before I answered, just to make sure I was talking about the right OS. :D
Good girl! :D

Post Reply