Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Angular Beta 16] Build performance degradation #16423

Closed
Tiberriver256 opened this issue Nov 22, 2018 · 7 comments
Closed

[Angular Beta 16] Build performance degradation #16423

Tiberriver256 opened this issue Nov 22, 2018 · 7 comments
Labels

Comments

@Tiberriver256
Copy link

Bug Report

Ionic Info
I am using the Angular CLI instead of the Ionic CLI so I will include my package.json instead to be hopefully helpful

{
  "name": "testapp",
  "version": "0.0.0",
  "scripts": {
    "ng": "npm run copy-ionic-angular && ng",
    "serve": "npm run copy-ionic-angular && ng serve",
    "serve.aot": "npm run copy-ionic-angular && ng serve --aot",
    "build": "npm run copy-ionic-angular && ng build",
    "build.aot": "npm run copy-ionic-angular && ng build --aot",
    "build.prod": "npm run copy-ionic-angular && ng build --prod --aot",
    "test": "npm run copy-ionic-angular && ng test",
    "lint": "npm run copy-ionic-angular && ng lint",
    "e2e": "npm run copy-ionic-angular && ng e2e",
    "copy-ionic-angular": "node ../../scripts/link-copy.js ionic/angular/test/testapp"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.1.0",
    "@angular/common": "^7.1.0",
    "@angular/compiler": "^7.1.0",
    "@angular/core": "^7.1.0",
    "@angular/forms": "^7.1.0",
    "@angular/http": "^7.1.0",
    "@angular/platform-browser": "^7.1.0",
    "@angular/platform-browser-dynamic": "^7.1.0",
    "@angular/router": "^7.1.0",
    "@ionic/angular": "^4.0.0-beta.16",
    "core-js": "^2.5.7",
    "rxjs": "^6.3.3",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.10.6",
    "@angular/cli": "^7.0.6",
    "@angular/compiler-cli": "^7.1.0",
    "@angular/language-service": "^7.1.0",
    "@types/jasmine": "^2.8.12",
    "@types/jasminewd2": "^2.0.6",
    "@types/node": "~8.9.4",
    "codelyzer": "^4.5.0",
    "ionicons": "^4.4.7",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.4.3",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.1",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "~3.1.6"
  }
}

Describe the Bug
When using ng serve`` or ng build --watch=true``` you make a change to a file and save it. It will take 12-15 seconds to recompile compared to just over 1 second on beta 6.

Steps to Reproduce
Upgrade the Angular test app in this project to the latest and greatest and then run ng serve and make any changes.

Related Code
My sample:
https://github.com/Tiberriver256/ionic/tree/master/angular/test/testapp

Expected Behavior
I would love to have it back down near 1 second as it makes the developer experience not very fun waiting so long. I have a different project that is larger than the testapp and I'm getting upwards of 40-50 seconds to recompile.

Hopefully it's just something I am doing wrong. Thank you!

@Tiberriver256
Copy link
Author

Could be a duplicate of #15844 although upgrading to Node 10 does not improve it much. I tried Node 8, 10 and 11 and all still way slower than it was previously.

@paulstelzer
Copy link
Contributor

Can confirm on beta.16 - Fork this repository and build the latest version of ionic - the build time to recompile decrease by 50 percent.

@manucorporat
Copy link
Contributor

manucorporat commented Nov 22, 2018

We updated to Angular 7 and TS 3.0, that's the only relevant change i can think of

@paulstelzer
Copy link
Contributor

paulstelzer commented Nov 22, 2018

UPDATE: Forget it, it must be something else - i do not get it reconstructed why I had yesterday 320 files with beta.16 and today (building with latest commit of Ionic) 188 files. If i switch back to beta.16 it still are 188 files. Or is it in cache? Don't know. But this was my case yesterday:

Beta.16 (320 files):
filezilla_2018-11-22_12-24-42

File 34.* and 35.* were both IonModalController (other Ionic components had the same issue - two files for the same component)

  • 320 files on release build
  • Needed around 18 seconds to recompile if running ionic serve

Latest Commit of Ionic (188 files)

code_2018-11-22_12-30-55

  • 188 files on release build
  • Needed around 4 seconds to recompile if running ionic serve

@Tiberriver256
Copy link
Author

Possibly related:
angular/angular-cli#12646

@manucorporat
Copy link
Contributor

Going to close since it does not seem related with ionic!

@ionitron-bot
Copy link

ionitron-bot bot commented Dec 28, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants