Skip to main content
Inspiring
June 16, 2012
Answered

improve loading time or show loading progress for iOS app?

  • June 16, 2012
  • 17 replies
  • 4549 views

Hello,

I have a 75 meg ipa file that takes about 30 seconds to load. Is there a way to improve the loading time or show the loading progress somehow?

I am compiling with air 3.1

I am building my project with Flash Professional 5.5

This topic has been closed for replies.
Correct answer 12345abcdefghi

Colin Holgate wrote:

What device are you testing on, and is the launch time any quicker the second time you try the app?

iPad 1st generation, iPod 3rd generation, iPod 4th generation

They all take about the same time to load


Ok I have an update which may be helpful to others. Some of this is probably common sense to many of you already.... Here is my solution:

1. Array Push statements are very CPU expensive. Eliminating 1500 of these shaved 8 seconds off of my start up time

2. Non device font text is expensive to load. Removing all of my vector text and replacing it with bitmaps saved 10 seconds of start up time. This meant a major over haul to my program but there were benefits to the exercise besides just the start up time.

3. Turning off the compile to SWC option saved about 5 seconds of loading time. Normally I would have this on so I can get better code hinting inside of Flash Builder. But at the last step, turning it off saves lots of start up time. I discovered this because I have a full and a lite version of my app (lite version had the swc compile option off, was much faster than the full version which had swc compile on). For a few hours one day I was trying to figure out why the lite version was starting up 5 seconds faster than the full version even though the lite version had more assets.

Full version start up time:

version 1.3:

25.6 seconds

version 1.4:

2.5 seconds

17 replies

Colin Holgate
Inspiring
June 16, 2012

You have some other issues that you'll face later, for being over 50 MB. Aside from exceeding the 50 MB limit for downloading over 3G, you also have to do a special deal with Google if you want it to be in the Google Play store. So, think about reducing the file size anyway. Also, expand the IPA file and see how large the actual app file is, that's close to the file size it will be when downloading from the stores. If it's just to be iOS, then what I said about Google Play wouldn't apply, of course.

Back to the loading issue….

Can you make large chunks of the app be external files? Either have all large images be external, and load them in with code when you need them, or have swfs that contain chunks of the animation. You are allowed to load and play swfs that don't have code in them.

Same with sound, anything that you can play as an external sound, either MP3 or in the timeline of a swf that you load, will all help.

In the end the loading time is down to the size of the initial swf, if you can get that to be small, and just load other things as you need them, then the app will open quickly.

Inspiring
June 16, 2012

My swf file is 14 megs. I moved all my images and sound out and it came to be 8 megs. No difference in the loading time. Reducing my IPA is impossible so that is out. Really no way to put a loading bar?

Colin Holgate
Inspiring
June 16, 2012

If your swf is 14 MB, and the IPA is 74 MBs, what makes up the extra 60 MB?

The 14 MB swf should load quickly, do you then load lots of extra things? If you do then you ought to be able to show a loading bar during that time.