RC4 seems slower to load the app

I am also seeing a big difference in load time. I just upgraded to RC4, scrips 0.47 and in prod mode too its take like 10sec to load the app. It was loading under 5 sec with rc3 and 0.45.

Please file an issue on the app-scripts repo.

Should I file two issues? One for the prod version of the app not working
and another for the slow app loading?

There are currently two issues regarding the blank screen. If you open the browser console you’ll probably also see there is an error "Uncaught Error: Cannot find module “./app.module.ngfactory” If not it might be another bug.


1 Like

I was using ios-depoy and ios-sim to run on device. When I use build and then run from xcode, the boot time is again back to ~5 sec. Just putting this here is someone seeing this issue.
Edit: I was wrong the time it takes is still about 9 seconds. This is not very good.

Hi, osi!

Thank you very much for your reply!!!

By reading the issues, one of the solutions have worked for me.

I just downgraded my typescript version to “2.0.9” on package.json and ran “npm upgrade”.

After that, running “ionic run android --prod --device” worked fine and even very fast!!! The app’s loading time is even faster than on RC3 now!

Here is my package.json config for anyone who is curious:

{
“name”: “ionic-hello-world”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “2.2.1”,
"@angular/compiler": “2.2.1”,
"@angular/compiler-cli": “2.2.1”,
"@angular/core": “2.2.1”,
"@angular/forms": “2.2.1”,
"@angular/http": “2.2.1”,
"@angular/platform-browser": “2.2.1”,
"@angular/platform-browser-dynamic": “2.2.1”,
"@angular/platform-server": “2.2.1”,
"@ionic/storage": “1.1.6”,
“ionic-angular”: “2.0.0-rc.4”,
“ionic-native”: “2.2.11”,
“ionicons”: “3.0.0”,
“rxjs”: “5.0.0-beta.12”,
“zone.js”: “0.6.26”,
“ng2-translate”: “^4.0.1”
},
“devDependencies”: {
"@ionic/app-scripts": “0.0.47”,
“typescript”: “2.0.9”
},
“cordovaPlugins”: [
“cordova-plugin-whitelist”,
“cordova-plugin-console”,
“cordova-plugin-statusbar”,
“cordova-plugin-device”,
“cordova-plugin-splashscreen”,
“ionic-plugin-keyboard”
],
“cordovaPlatforms”: [],
“description”: “DWMasterCompanion: An Ionic project”
}

And here is my ionic info:

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.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.2.0
Xcode version: Not installed

Hello @danielsousat,

Could you please confirm that using 2.0.9 version of typescript helped you? It is mentioned in official guide for migration to use 2.0.9 and I have performance issues with it.

Hi. Yes, I confirm that typescript v 2.0.9 has worked for me.

But I have to state that my app is pretty simple. And the only performance issue I had was the app’s loading time, that was solved by using typescript 2.0.9 along with the --prod build of the app.

Ah, shoot. I develop for iOS and the – was broken by the newline!

Ah yes, I’ve tested only on Android. I don’t how is the perfromance on iOS.

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