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 serve update very slow #636

Closed
neilhem opened this issue May 5, 2016 · 26 comments
Closed

ng serve update very slow #636

neilhem opened this issue May 5, 2016 · 26 comments

Comments

@neilhem
Copy link
Contributor

neilhem commented May 5, 2016

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?

@xeoneux
Copy link

xeoneux commented May 5, 2016

@neilhem Is it on Windows?

@neilhem
Copy link
Contributor Author

neilhem commented May 5, 2016

Mac OS X 10.11.4

@neilhem
Copy link
Contributor Author

neilhem commented May 6, 2016

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

@hansl
Copy link
Contributor

hansl commented May 6, 2016

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.

@danielmhair
Copy link

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

@danielmhair
Copy link

Build successful - 72474ms.

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

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

@danielmhair
Copy link

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?

@josephwoodward
Copy link

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

@neilhem
Copy link
Contributor Author

neilhem commented Jul 18, 2016

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

@lbecker34
Copy link

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.

@girishbalanagu
Copy link

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.

@filipesilva
Copy link
Contributor

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

@smrtsmrf
Copy link

smrtsmrf commented Sep 4, 2016

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

@neilhem
Copy link
Contributor Author

neilhem commented Sep 4, 2016

@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.

@stellasoft-will
Copy link

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!?

@filipesilva
Copy link
Contributor

@smrtsmrf @stellasoft-will see #1980 for your problem.

@albanx
Copy link

albanx commented Oct 30, 2016

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.

@neilhem
Copy link
Contributor Author

neilhem commented Oct 31, 2016

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

@albanx
Copy link

albanx commented Oct 31, 2016

@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

@johannesjo
Copy link

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.

@filipesilva
Copy link
Contributor

@johannesjo the main thread for rebuilds being slow is in #1980. This one is an old thread related to the old build system.

@johannesjo
Copy link

@filipesilva thank you for linking the issue another time.

@daviatorstorm
Copy link

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

@denkomanceski
Copy link

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

@imspikey
Copy link

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

@hansl
Copy link
Contributor

hansl commented Jan 18, 2017

@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.

@angular angular locked and limited conversation to collaborators Jan 18, 2017
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