RC4 seems slower to load the app

The command is --prod. The problem is that the AoT was broken in the .47 version of app-script.

1 Like

after upgraded from rc2 to rc4. my app start time increased from 4 secs to 11 secs.
I’m actually going to revert to rc2.

Hi man. Before doing that downgrade, try to build the app in --prod . That
fixed the loading time for me.

-prod didnt solve the problem. In your case was rc4 faster than rc3?

Yes! but only compiling with --prod and on Android. I didn’t test on iOS.

actually im on rc2. rc3 seemed slower than rc2 so reverted back.
I will test with rc4 and compare with rc2.

RC4 app is MUCH slower to load for me too! Neither -prod, nor --prod seemed to make any difference? Android only.

I can confirm the loading of my app is a little faster when using --prod to build on Android.
The loading time is around 3 sec which is still acceptable.

I can also confirm that without --prod, android builds give me a white screen for about 13 seconds on all of my devices. Using --prod as suggested above reduces that time to about 3 seconds. Happens with RC4 and 0.0.48 of app-scripts.

The command is --prod as previously pointed out by others. I’m not sure how true this is, but whenever I build for android I always run ionic build android before running ionic run android

Actually my app too is now way more slower at startup, freak I just notice it yet! Like 10sec more in comparison to RC.3 nightly and app-script 0.0.45-47

I build it with

 ionic build android --prod

All dependencies as up-to-date and freshly new installed. Typescript is 2.0.9

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.48
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.2.1
Xcode version: Xcode 8.0 Build version 8A218a

1 Like

And I can add to that that my app boot faster than my Nexus 5X on a real iPhone … 4s!!!

I build android and iOS app the same way.

So it’s seems for me that something weird in my android build and seems ok on iOS.

Update: I guess that is the issue to follow ->

Make sure you all have the latest ionic CLI.

npm install -g ionic@latest

*sudo may be required depending on your individual npm environment.

If it’s still really slow, there is a good chance that --prod argument is NOT getting passed to the build process. You can verify by looking at the build details and see if ngc is listed.


1 Like

thx @danbucholtz it solved the issue, my boot time is back to normal on my Nexus 5X (around 6 sec).

I updated my npm install, removed existing Ionic install, and re-installed with latest. A new sidemenu app now loads in 3 seconds. My existing app also loads in 3 seconds now. Thanks for help.

I updated cli but no luck it takes much time. I did not see --prod in build details …Can you please help me?

Here is build details

© 2015 Microsoft Corporation. All rights reserved.

C:\anuranjan\appdev\ionic2\rc4\Demo\myapp>ionic serve

ionic-hello-world@ ionic:serve C:\anuranjan\appdev\ionic2\rc4\Demo\myapp
ionic-app-scripts serve “–v2” “–address” “” “–port” “8100” “–livereload-port” “35729”

keywords if/then/else require v5 option
[20:02:40] ionic-app-scripts 0.0.47
[20:02:41] watch started …
[20:02:41] build dev started …
[20:02:41] clean started …
[20:02:41] clean finished in 4 ms
[20:02:41] copy started …
[20:02:41] transpile started …
[20:02:56] transpile finished in 14.71 s
[20:02:56] webpack started …
[20:02:57] copy finished in 15.59 s
[20:03:18] webpack finished in 21.42 s
[20:03:18] sass started …
[20:03:22] sass finished in 4.59 s
[20:03:22] build dev finished in 40.98 s
[20:03:23] watch ready in 41.66 s
[20:03:23] dev server running: http://localhost:8100/

[20:08:12] build started …
[20:08:12] transpile update started …
[20:08:13] transpile update finished in 360 ms
[20:08:13] webpack update started …
[20:08:17] webpack update finished in 4.42 s
keywords if/then/else require v5 option
[20:08:36] build finished in 24.20 s

Running ionic serve will always be a development build optimized for fast development.

When you run ionic run android or ionic run ios, it will be a development build by default because the production build takes longer. ionic run ios --prod will generate a prod build.

Prod builds are AoT compilation + minification. If you just want AoT, run ionic run android --aot. Only use this for debugging, the minification is important.


1 Like

Hi @danbucholtz

Thanks for your quick response.If I understand it clearly, ionic serve should be faster but that doesn’t seem to be happening on my machine and it (ionic serve) takes more than 40 second sometimes even 2 or 3 minute or I need to break to build process using ctrl+c and re-run.

C:\anuranjan\appdev\ionic2\rc4\Demo>ionic info

Your system information:

ordova CLI: 6.4.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.3.0
Xcode version: Not installed

Please help.

hi @toanuranjans for ionic serve this may help

i faced this problem remove node v7 install v6 stable

in your folder of project run

npm rebulid

if not workeed run

npm install

this will decrease serve time to 10 sec and if u modified files around 4 to 7 to process them
i have SSD if not ssd it may be slower

but this has no relation to this white screen i cam from RC3 it was much better
i tried with
-prod also --prod with no luck
hope final resale come i hated this RC versions

1 Like

after alot of tests and tries i confirm that this solved the problem with me
use this if linux or mac before run

sudo -i
use this after that

npm uninstall -g ionic
npm cache clean
npm install -g ionic@latest

hope this help you