Ionic app takes 16 seconds to start


#1

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


#2

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


#3

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…


#4

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

They do.


#5

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.


#6

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.)


#7

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.


#8

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


#9

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


#10

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


#11

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…


#12

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.


#13

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)?


#14

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


#15

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.


#16

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.


#17

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


#18

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


#19

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


#20

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