App loading time?

Hi!

I was just wondering which factors effect the time it takes the app to load.

Is it the size of the app, or maybe the amount of stuff I have in the main.lua file?
Thanks! [import]uid: 130035 topic_id: 34597 reply_id: 334597[/import]

It’s the amount of stuff you have in main.lua. There is some initial startup time to load your app’s executable bundle which can vary depending on the size of the app, but most of your loading time is the time it takes to read external files, like images, audio, video, data files, etc. If you front load (i.e. do all of that in main.lua) it will slow down the startup time. If you can defer loading images and such until you need them you will load faster.

Also things that slow you down are initializing 3rd party services like Game Center, ads, analytics, facebook etc. If you start your facebook login process and get your “me” object for instance, all in your main.lua, it’s going to complete all of that before it moves on.
[import]uid: 199310 topic_id: 34597 reply_id: 137562[/import]

Okay, so what I was thinking in that case is to create a “scene” right after main file which would be a loading scene with dynamic elements ( like progress bar ). Can I just move most of the stuff from main to the second scene so the loading of the app is a little more entertaining? [import]uid: 130035 topic_id: 34597 reply_id: 137565[/import]

that should work.
[import]uid: 199310 topic_id: 34597 reply_id: 137571[/import]

It’s the amount of stuff you have in main.lua. There is some initial startup time to load your app’s executable bundle which can vary depending on the size of the app, but most of your loading time is the time it takes to read external files, like images, audio, video, data files, etc. If you front load (i.e. do all of that in main.lua) it will slow down the startup time. If you can defer loading images and such until you need them you will load faster.

Also things that slow you down are initializing 3rd party services like Game Center, ads, analytics, facebook etc. If you start your facebook login process and get your “me” object for instance, all in your main.lua, it’s going to complete all of that before it moves on.
[import]uid: 199310 topic_id: 34597 reply_id: 137562[/import]

Okay, so what I was thinking in that case is to create a “scene” right after main file which would be a loading scene with dynamic elements ( like progress bar ). Can I just move most of the stuff from main to the second scene so the loading of the app is a little more entertaining? [import]uid: 130035 topic_id: 34597 reply_id: 137565[/import]

that should work.
[import]uid: 199310 topic_id: 34597 reply_id: 137571[/import]