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

ng test much slower than ng build/serve #5334

Closed
bialad opened this issue Mar 9, 2017 · 3 comments
Closed

ng test much slower than ng build/serve #5334

bialad opened this issue Mar 9, 2017 · 3 comments

Comments

@bialad
Copy link

bialad commented Mar 9, 2017

OS?

Linux (Ubuntu 16.04)

Versions.

@angular/cli: 1.0.0-rc.1
node: 6.10.0
os: linux x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.9

Repro steps.

ng test is much slower than ng build and ng serve on both first build (60s vs 20s), and on retriggered builds (20s vs 1s).

It's spending alot of time on chunk asset optimization, so this looks like the previous problems with build performance discussed in #1980. Is it the same problem, and the fix for build and serve hasn't been implemented in test yet?

Also ng test seems to build the entire app-folder even though my tests are confined to pure functions in spec-files. This seems to go against what's defined in test.js, where only spec.ts-files are gathered. I've tried running ng test --build false, but it doesn't make a difference.

Mention any other details that might be useful.

If I run ng test --sourcemap false I get comparable performance, but this is puzzling to since build/serve runs with sourcemaps enabled...

@hccampos
Copy link

hccampos commented Mar 9, 2017

Same here. In fact, after the first run, a save triggers a rebuild which gets stuck for even longer until webpack crashes with an out of memory error.

@filipesilva
Copy link
Contributor

Tracking in #5423.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants