ember-cli / ember-cli

The Ember.js command line utility.
https://cli.emberjs.com
MIT License
3.26k stars 1.16k forks source link

Incredibly slow [initial] build times with ember-cli 0.2.1 #3637

Closed thomasjmwb closed 9 years ago

thomasjmwb commented 9 years ago

after creating a new ember app I'm getting what I think is very slow build time.. with a new app I see the following: image

rebuild: image

What should I expect build time for a pretty small app to be? I'm seeing this problem magnified in a much larger app: image Some more context around the big app:

Our Brocfile.js / bower.json: https://gist.github.com/thomasjmwb/b4bbdde5e9c1a972de7d

file # stats:

total files: 1045 ./pod-a 41 ./pod-b: 52 ./adapters: 29 ./pod-c 52 ./pod-d ./pod-e 46 ./pod-f 12 ./pod-g 184 ./pod-h 16 ./commons: 16 ./components: 50 ./controllers: 18 ./data-access: 2 ./pod-i 14 ./helpers: 1 ./mixins: 27 ./models: 15 ./pod-k: 64 ./properties: 19 ./routes: 14 ./serializers: 31 ./pod-l: 48 ./styles: 67 ./pod-m: 21 ./templates: 94 ./transforms: 14 ./views: 59

I am on windows, but our developers on mac and linux are both seeing long build times like i've described. I've also tried the prescribed solutions for windows, using ember-cli-windows-addon, making sure i dont have virus scanners running etc.

Could someone point out some potential pitfalls that I'm hitting with a large project?

stefanpenner commented 9 years ago

We are working on it. Making some good progress the next release will be noticeably better. Feel free to follow along on the stress test repo. And it will continue on those lines.

Ultimately if you have some extremely costly filters that don't have a persistent cache. Boot is going to be slow. Please be sure to open issues on offending broccoli-plugin issue trackers

mojics commented 9 years ago

I'm crying over this, I wanted to give Ember Js another try but the slowness of build is somehow pushing me back for our new project. I can't do anything productive with ember right now, because every change I do make my workspace freeze literally.

mmahalwy commented 9 years ago

@stefanpenner when is 13.9 coming out?

rokka-n commented 8 years ago

Hmmm, emeber 2.4.2 with the latest stuff, in docker... It downloads 260MB of node package on ember init... well, okey.

But compilation time, oh man 40 seconds

docker-compose run --rm ember server
version: 2.4.2
Livereload server on http://localhost:49152
Serving on http://localhost:4200/

Build successful - 36808ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
Babel                                         | 8827ms
Babel                                         | 8807ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Babel (12)                                    | 23319ms (1943 ms)
stefanpenner commented 8 years ago

@rokka-n if you have perf issue. Please read the perf_guide.md in this repo

rokka-n commented 8 years ago

Thank you. I looked through it, I guess its mainly saying about npm packages being up to date.

I've created container to run ember, npm and some other tools. ember server also correctly works with live autoreload in this container. To run it, I used docker host bootstrapped with docker-machine and gave it 4GB memory. It was running on macbook pro.

https://github.com/rokka-n/containers/tree/master/docker_ember_cli

I'm curious if anybody can get substantially better results for ember server, than mentioned above.