Ionic app takes 16 seconds to start

My ionic app takes 16 seconds to start , after splash screen of 3 seconds it atleast 13 seconds to start can you please help ??
tried --prod several times during build

ionic cordova build android --prod
and also tried
cordova build android --prod
but still facing this issue please help

1 Like

What is your ionic info output?
What is your app doing?
What plugins are you using? (ionic cordova plugin list)

1 Like

The ultimate solution is building apk file using this command:

ionic cordova build android --release --prod

This will completely eliminate long loading screen issue.
I wonder why Ionic team didn’t put this command on their doc page…

You mean like on their page where they talk about deploying?

They do.

Yes they do talk about this command:

ionic cordova build android --prod --release

and guess what? it doesn’t eliminate that long loading screen problem.
I tried this command instead:

ionic cordova build android --release --prod

and I could completely eliminate splash screen from my ionic app. Now my Ionic app takes only 3 seconds to start.

1 Like

You posted the same command twice, only with a different order of parameters.
These two do absolutely the same thing.
(--prod is for the Ionic build, --release for the Cordova build later on.)

1 Like

Well, that’s weird… because the two commands built different APK files.

–prod --release built an apk file with the original ionic stock splash screen with long loading time.

–release --prod built an apk file without any splash screen.

I tested it many times on my HTC android phone yesterday.

1 Like

Then you should 100% open an issue here: https://github.com/ionic-team/ionic-cli/issues

2 Likes

thanks for suggesting me solutions let me try out this solutions then get back to you soon.

1 Like

U know you are mixing double and single dashes for the prod and release flags in your post? --prod and -prod and similar to release

1 Like

I wish Ionic team just leave it this way because --release --pro works just fine for my current project. It indeed totally erases white loading screen and stock splash screen!
It gives me 3 second long gray blank screen on start but that’s all I get for now.
If you guys find a way to completely remove this gray blank screen on start, please let me know.

Now my app is very close to a native app written in Java besides the gray blank screen on start. All cordova apps seem to ship with this short gray blank screen…

There is nothing to change as it works perfectly fine and 100% identical no matter what order you specify the parameters. But as you are convinced it is different for you, you are obviously hitting a nasty bug that has to be reported.

1 Like

I have no idea but I’m satisfied with the result.

Is there any way to erase the gray blank screen from Ionic app (android)?

Open a new topic where you describe your problem and someone will look into it.

1 Like

I opened a topic but nothing came up yet. I built an app based on Apache Cordova without ionic or phone gap. It showed the same gray blank screen on my HTC android phone when it starts. I guess this is a problem from Cordova… Java and C# apps go straight into a custom made splashscreen or app screen without this gray screen.

No it’s not, a default Ionic app does not have that problem and a pure Cordova one can also be made this way by using the splashscreen plugin.

A post was split to a new topic: I’m trying to use a custom made CSS3 animation on an HTML page

Hi ,

After some research and all efforts spend found that we have to use ionic tags in place of “DIV” ot “Input”.

This give much difference with time… Can reach app start time to 5 sec for sure

may be this will be the problem because i used div many times but sir when grey screen is shown then i checked through debugging mode then no file seems to be loading or taking time . when no file is rendering then it is possible for them to take time to load

1 Like

For the First home page must be with all ionic contents . then there will be no lagging once loaded.