Memory issue for iPad Livecode apps?

Malte Brill revolution at derbrill.de
Thu Mar 10 16:07:35 EST 2011


What you have to keep in mind (just ran into this myself) is that an app gets terminated by the OS if it takes up too much memory. Of course the simulator will not simulate the memory situation of the device (and this sucks big heap), as well as it does not reflect the processor speed (sucks again), which basically leaves you with the resources your dev computer has and not a relevant picture of the real device situation. :-(

Now what does that mean? - Always test on a real device. Get a worst case device (first gen iPod touch in my case)

Rgarding memory consumtion. If you work with images, keep in mind that you can not calculate with the filesize your images are using. Images will be decoded into the graphics buffer on the device, as soon as they are being displayed. This will use up 4 bytes per pixel. So if you are using a 100 by 100 image, it will end up claiming 40000 bytes in the graphics buffer, even though its filesize might be significantly smaller. 

Also, the decoding into the graphics buffer takes time (and this depends on processor speed of the device as far as I can see). So if you have many images on your first card, you will see the splash screen much longer then if there are no images. If you instead do an import paint from a resource folder, you can at least display a progress bar to your user. However you add quite some overhead to load time this way. What fits, depends on your app.

All the best,

Malte



More information about the use-livecode mailing list