Angular-cli: ng serve update very slow

Created on 5 May 2016  路  26Comments  路  Source: angular/angular-cli

After updating to the latest version of angular-cli compilation time is very slow

Build successful - 36925ms.
Slowest Trees                                 | Total
----------------------------------------------+---------------------
DiffingSWManifest                             | 30480ms
Funnel                                        | 4331ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
DiffingSWManifest (1)                         | 30480ms
Funnel (8)                                    | 4966ms (620 ms)

What will be the reason?

Most helpful comment

CLI Compilation is really slow. It completely freezes my computer. Here are the details about my environment:
angular-cli: 1.0.0-beta.8
node: 6.2.1
os: win32 x64
Windows 10

All 26 comments

@neilhem Is it on Windows?

Mac OS X 10.11.4

After updating angular-cli to version 0.1.0 compilation runs fast, but app loading time in browser increased significantly

We removed the SWManifest for two reasons;

  1. it wasn't used, replaced by other technologies. And if you don't need it;
  2. it takes a lot of time to build with the new vendors.

As for the live reloading, that is because we now pull all the files as dependencies using SystemJS. We know about this and it will be greatly improved really soon.

CLI Compilation is really slow. It completely freezes my computer. Here are the details about my environment:
angular-cli: 1.0.0-beta.8
node: 6.2.1
os: win32 x64
Windows 10

Build successful - 72474ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
vendor                                        | 65089ms
BroccoliTypeScriptCompiler                    | 4780ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
vendor (1)                                    | 65089ms
BroccoliTypeScriptCompiler (1)                | 4780ms

I tried to add bootstrap-material-design module to my project. Seeing as the vendor is the culprit, I'm sure I did something wrong, but should it show an error, instead of hanging this long?

I'm also experiencing the same issues, this time on a Windows machine:

Build successful - 10552ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
vendor                                        | 7310ms
BroccoliTypeScriptCompiler                    | 2569ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
vendor (1)                                    | 7310ms
BroccoliTypeScriptCompiler (1)                | 2569ms

I hope with Webpack compilation and app load time will increase significantly

I'm experiencing this issue. App compilation brings my mac to a complete halt. In firefox, I can watch the .js files load slowly one by one.

I am also facing this issue in Windows 7 OS. When I tried do ng-serve in command prompt it takes lots of time to complete and once modifying any file takes too much time. Please give any suggestions to overcome in windows.

The webpack branch fixes this. See https://github.com/angular/angular-cli#webpack-preview-release-update for instructions on how to update.

I'm using the webpack version, but it's still super slow on updating.

@smrtsmrf hi, show us datas, screenshots, version of cli you are using. Otherwise we will not help you and find out what causes slow update.

web pack version 8 is so slow it is unusable on a mac it was good before you moved assets from public to assets folder. when this be fixed!?

@smrtsmrf @stellasoft-will see https://github.com/angular/angular-cli/issues/1980 for your problem.

Extremly slow on windows, how can one develop in this way:

776ms building modules
13ms sealing
1ms optimizing
0ms basic module optimization
250ms module optimization
3ms advanced module optimization
29ms basic chunk optimization
1ms chunk optimization
0ms advanced chunk optimization
118ms module and chunk tree optimization
275ms module reviving
4ms module order optimization
7ms module id optimization
11ms chunk reviving
2ms chunk order optimization
31ms chunk id optimization
85ms hashing
2ms module assets processing
111ms chunk assets processing
6ms additional chunk assets processing
0ms recording
0ms additional asset processing
2658ms chunk asset optimization
701ms asset optimization
79ms emitting
Hash: abc98f33c0520c911e34
Version: webpack 2.1.0-beta.25
Time: 7929ms
           Asset     Size  Chunks             Chunk Names
  main.bundle.js  3.99 MB    0, 2  [emitted]  main
styles.bundle.js  10.2 kB    1, 2             styles
       inline.js  5.53 kB       2             inline
      styles.map    14 kB    1, 2             styles
      inline.map  5.59 kB       2             inline
        main.map  4.22 MB    0, 2  [emitted]  main
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  3.42 kB       0
webpack: bundle is now VALID.

@albanx without angular-cli versoin your using there is no way to find out what is the problem

@neilhem right but this problem persist in all versions. My version is:

angular-cli: 1.0.0-beta.19-3
node: 6.6.0
os: win32 x64
  "devDependencies": {
    "@angular/tsc-wrapped": "^0.3.0",
    "@types/hammerjs": "^2.0.33",
    "@types/jasmine": "^2.5.36",
    "@types/node": "^6.0.46",
    "@types/protractor": "^1.5.20",
    "angular-cli": "^1.0.0-beta.19-3",
    "codelyzer": "1.0.0-beta.3",
    "hammerjs": "^2.0.8",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.7.0",
    "karma": "1.3.0",
    "karma-chrome-launcher": "2.0.0",
    "karma-jasmine": "1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "4.0.10",
    "ts-node": "1.6.1",
    "tslint": "3.15.1",
    "typescript": "^2.0.6",
    "typings": "^1.5.0"
  }

The dev experience is extremely poor if it takes more than 10 seconds to see every code change...!! I think this should be the priority number one issue

I wonder why this is closed. Personally I think that everything above 2 seconds compile time is too much. Preferably it should be even less (ideally less then 1 second). I'm using the latest version of angular-cli (1.0.0-beta.19-3). It takes about 5 seconds to recompile for a fresh build on a relatively fast machine with a SSD. This probably will be much more once you build a real application.

@johannesjo the main thread for rebuilds being slow is in https://github.com/angular/angular-cli/issues/1980. This one is an old thread related to the old build system.

@filipesilva thank you for linking the issue another time.

Experimented with https://github.com/AngularClass/angular2-webpack-starter.
image

But angular cli at start
image

When file .ts chenged
image

angular-cli: 1.0.0-beta.19-3
node: 6.9.1
os: win32 ia32

I dont know why this issue is closed. The build process is decreasing angular development a lot.. in my company we are like 6 developers who most of the time wait on the compiler all day long

live reloading is still slow for me is there is any fix for that?

@denkomanceski said:

I don't know why this issue is closed.

Because this issue was created before we were even using Webpack.

I'm locking this conversation because there are already other tracking issues for the re-build time, and this just adds to the noise.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IngvarKofoed picture IngvarKofoed  路  3Comments

rwillmer picture rwillmer  路  3Comments

purushottamjha picture purushottamjha  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments

hartjo picture hartjo  路  3Comments