What elements should I optimize to improve my load times?

My app used to load in a flash - so I built my intro experience around not having a loading screen.

A few months later, I’ve discovered that on some old Android phones, my game now takes 9-10 seconds to load! This is, obviously, not acceptable.

So I wonder - what elements contribute most to load times? Is it different on iOS vs Android? Some possible candidates:

1 - More textures exist (actual texture memory usage is still low, but there are lots more textures available to load than there used to be.)
2 - Data tables have become huge.
3 - Additional modules (Open Feint, Facebook, etc.) are being used by my game now.

Anyone have any good pointers for how I can get my load times back down? [import]uid: 65996 topic_id: 19336 reply_id: 319336[/import]

For low end Android devices I’m not surprised, unfortunately.

How much texture memory are you actually using, OOI? [import]uid: 52491 topic_id: 19336 reply_id: 74623[/import]

Initially around 8MB - that can get close to 9.5 after the game has been running a while, and there are more things happening.

Texture memory only applies to images which are actually loaded, correct? Because I have about 18MB of textures in my app total, and clearly the aren’t all in use all the time!

[import]uid: 65996 topic_id: 19336 reply_id: 74632[/import]

It only applies to textures that are loaded, yes.

For the lower end Android devices it might be be worth staggering how you do things, for example you might initiate openfeint and wait a few seconds to load other things, or vice versa.

When you say load times we’re talking about the initial load and not “scene changes”, yes? [import]uid: 52491 topic_id: 19336 reply_id: 74648[/import]

Yes, the initial load times are the problem. First-time load from a new install is currently 30(!) seconds, and subsequent load times are around 9 seconds.

By comparison, iOS test devices load in 2 seconds. [import]uid: 65996 topic_id: 19336 reply_id: 74945[/import]

That is not good :S

What old Android devices are you testing on? What build of Corona are you using?

I know lower end Android devices are slower than the iPhone4, for example - but that’s a LONG load time. [import]uid: 52491 topic_id: 19336 reply_id: 75003[/import]

We test on a Droid Incredible, running OS 2.2 (older, but we wanted to ensure compatibility)

We also test on an iPad 2, iPad touch gen 3, and Samsung Galaxy Tab 10.1 (OS 3.2)
The Droid and Galaxy Tab are distinctly slower (double or triple time) to load the game. This wasn’t the case when we had our first preliminary builds - but somewhere along the way something bloated those times.

Oh, and we’re using the latest public build (we don’t generally integrate daily builds, though we could if necessary.)
[import]uid: 65996 topic_id: 19336 reply_id: 75359[/import]

Oh so sorry! How can I delete the multiple posts? Peach, can you help? I was impatient and pressed the save button a million times :frowning:

Mo [import]uid: 49236 topic_id: 19336 reply_id: 75391[/import]

Cleaned - don’t worry about it :slight_smile:

All I can suggest at this stage is debugging and trying to step back in your code to isolate the problem areas to try and perhaps address them differently.

Peach [import]uid: 52491 topic_id: 19336 reply_id: 75420[/import]

Hi Simon

I could suggest the profiler here:

http://developer.anscamobile.com/forum/2011/11/19/corona®-profiler-line-line-analysis-your-code-promo-codes-included-0

It may help found the bottleneck in your code. Just a suggestion since it found some in my code. And for $6.99 you cannot go wrong.

Good luck.

Mo

Ps: I am only a very satisfy user nothing more. [import]uid: 49236 topic_id: 19336 reply_id: 75390[/import]

Thanks Peach!

Mo

ps: Not sure why the link I posted about does not work? (cannot click on it) I am sure the address is correct. [import]uid: 49236 topic_id: 19336 reply_id: 75426[/import]

I have no idea why it wasn’t showing as a proper link, but fixed :wink:

Peach [import]uid: 52491 topic_id: 19336 reply_id: 75551[/import]

You the best. Thank you Peach!

Mo [import]uid: 49236 topic_id: 19336 reply_id: 75571[/import]

Not a problem, Merry Christmas!

Peach :slight_smile: [import]uid: 52491 topic_id: 19336 reply_id: 75645[/import]