How to significantly reduce loading time on android

Hello guys,

What do you guys do to reduce loading time of your apps?
I have an app that will have 200MB+ of media files loaded.
I’m trying to reduce its loading time as much as I can. I did everything I could but I still get about 7 seconds of loading time to make everything work properly on start.

Please share your tricks.

Thanks in advance.

Did you compilate the application in --prod mode?

1 Like

This gets really hard, really fast. It’s a very well studied problem, especially by platforms like Vimeo and YouTube. So there’s a lot of tech out there. But it’s not easy to program. Basically, you need to chop your files into small pieces, and load them one after the other. Build your own local streaming service.

If you’re not willing/able to do that, then you need to be more clever about the structure of your app. For example, load something small at startup, and load bigger things in the background, after the user has something to do.

1 Like

Yes. It’s prod mode but I feel this angular is maybe slow on my testing HTC phone. I will soon test this app on five other android devices.

I can’t spot much problem in my coding… I follow all instructions and did the way it should and exported the app using --prod --release. This loading time problem has been here since the beginning. How long does it take to load your ionic android apps?

I see some apps built on phonegap can be loaded pretty fast. Eventually I would like to build my own streaming service using Firebase. That’s not going to be too far future but I want to make it work fine offline for this initial release.

Only a couple seconds, but I do nothing in constructors and everything with Observables. So the app loads right away, and the content loads over time. If you want to load a ton of stuff right away, it might take a while.

1 Like

Yes, maybe this is because I’m trying to set up too many things on start… I have lots of things that should set up properly on start. Thanks,

But how is it possible to do nothing in constructor? that will affect the majority of important features of app?

Remember that you have almost no control over what platform the user runs your app on. This is the great benefit/challenge of hybrid programming. No matter how slow it is for you, some users are going to run your app on a platform that’s worse.

1 Like

True, that’s why I’m trying to test this app on a cheap smartphone like this:

Believe it or not, it has android running fine for $26.

See: https://github.com/mgechev/angular-performance-checklist

1 Like

Thanks,

Yes, it says about production mode in Angular.
I could import ‘enableProdMode’ from Angular core!

This is automatically done when you build with the --prod flag.

1 Like