Minimum system requirements to run Ember CLI


#1

Ember CLI is unbearably slow on my machine. For example:

Build successful - 80898ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
ConcatWithMaps                                | 33760ms             
BroccoliMergeTrees                            | 16761ms             
ES6: App Tree                                 | 14163ms             
Addon#treeFor (ember-composability - addon)   | 4883ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
ConcatWithMaps (4)                            | 33954ms (8488 ms)   
BroccoliMergeTrees (5)                        | 16786ms (3357 ms)   
ES6: App Tree (1)                             | 14163ms             
Addon#treeFor (ember-composability - a... (1) | 4883ms 

Granted, I have a rather old MacBook:

My coworkers’ machines have near instantaneous response when they make a change to our app. We figure my problem is a combination of:

  • low ram ( 8gb vs 16)
  • i5 processor (vs i7)
  • optical drive (vs flash memory)

It would be great if there was an accepted “minimum system requirements” listed on the Ember CLI website.

Has anyone else experienced such slow speeds? If so, did you manage to correct it without buying a new machine? I plan on getting a new MacBook soon, but until then…


#2

Dude, that’s really bad. I think you have something else wrong. I see people reporting slowness on Windows, but never anything like this, and certainly not on OS X. I’ve seen some issues due to weird imports and re-imports … maybe you could post your ember-cli-build.js file?

I have a moderate size app (about 60K lines of app code) and my initial build time is like 10s and my rebuilds are about ~500ms. If you can provide a repo where this is reproducible, I’m sure one of the Ember-CLI guys would love to take a look.

What version of Ember-CLI are you using? Do you have any colleagues who have had this poor performance with your app on their machine?


#3

So I created a fresh app and it only took about 12s to start up, and then 700ms to rebuild. Our app is a pretty healthy size, about 32k lines. Heres our ember-cli-build.js

/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
  });

  app.import('bower_components/chartist/dist/chartist.min.js');
  app.import('bower_components/chartist/dist/chartist.min.css');

  app.import('bower_components/cryptojslib/rollups/sha256.js');
  app.import('bower_components/cryptojslib/rollups/hmac-sha256.js');

  app.import('bower_components/sweetalert/dist/sweetalert.min.js');
  app.import('bower_components/sweetalert/dist/sweetalert.css');

  app.import('bower_components/parsleyjs/dist/parsley.min.js');

  app.import('vendor/pnglib.js');
  app.import('vendor/identicon.js');
  app.import('vendor/md5.js');
  return app.toTree();
};

I’ve fought with this the last few months. There are a number of guys on my team and neither of them have performance like this. But then again, their machines are each less than a year and a half old.


#4

I don’t know why but I can tell you the year of machine is not the reason, I’m using a 09’ MBP w/ upgraded of 8G ram, it still very fast.

Try another angle, maybe try to delete project from your local machine and re-produce it again.


#5

So I followed @nightire’s advice and deleted my project and reinstalled it, thinking along the same vein of “turn the machine off and back on”. I dont know if it really helped. I have build times around 59s, 31s, and 47s for literally only adding some whitespace in a coffeescript file.

version: 1.13.8
Livereload server on http://localhost:49152
Serving on http://localhost:9000/

Build successful - 59245ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
TemplateCompiler                              | 30033ms             
ConcatWithMaps                                | 5880ms              
Babel                                         | 5477ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
TemplateCompiler (5)                          | 30900ms (6180 ms)   
Babel (16)                                    | 13389ms (836 ms)    
ConcatWithMaps (4)                            | 6141ms (1535 ms)    

file changed pods/billing/route.coffee

Build successful - 31971ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
CoffeeScriptFilter                            | 11390ms             
ConcatWithMaps                                | 8886ms              
Funnel: App JS Files                          | 3777ms              
Babel                                         | 2924ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
CoffeeScriptFilter (2)                        | 11500ms (5750 ms)   
ConcatWithMaps (4)                            | 8922ms (2230 ms)    
Funnel: App JS Files (1)                      | 3777ms              
Babel (16)                                    | 2981ms (186 ms)     
CustomReplace (3)                             | 2345ms (781 ms)     

file changed pods/billing/route.coffee

Build successful - 47726ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
CustomReplace                                 | 22856ms             
BroccoliMergeTrees                            | 7661ms              
SimpleConcat                                  | 3867ms              
TreeMerger: (re-exports)                      | 3632ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
CustomReplace (3)                             | 22985ms (7661 ms)   
BroccoliMergeTrees (5)                        | 7770ms (1554 ms)    
SimpleConcat (3)                              | 3869ms (1289 ms)    
TreeMerger: (re-exports) (1)                  | 3632ms              

#6

Maybe throwing up a bat signal for some help from the uber experts will help:

@stefan @rwjblue


#7
  • is Watchman installed?
  • Can you upgrade to a SSD (I upgraded my 2012 Macbook Pro to an SSD, helped a huge amount)
  • Can you upgrade to the latest ember-cli
  • Have you turned off indexing of dist and tmp on whatever IDE / Editor you are using.

#8

version: 1.13.8 this is an old version, 1.13.12+ has many big performance improvments. Please be sure to update all broccoli plugins

npm ls brococli-merge-trees broccoli-funnel broccoli-filter broccoli-presistent-filter broccoli-merge-trees

to see what versions exist, check to make sure they are up to date.

We have WIP guide to help further: https://github.com/ember-cli/ember-cli/pull/5096

–––––

for reference, applying all the above work, has resulted in the largest app i work on 200kloc + css + addons + bower stuff to rebuild 500ms->600ms (original 10s+) MPB but with encrypted drive.

There are likely some offending plugins, if discovered we can fix them.

Broccoli-merge-tree has a big perf fix in, but it has not yet been released. Hopefully later this week(end).


#9

So I upgraded to Ember-CLI 1.13.12 and I can definitely see the performance difference. There are times where it’ll only be around 2s to rebuild, but other times are about 20 - 40. The big difference is that now those times seems to accurately reflect rebuild times, whereas before it always seemed like it was taking even longer than that (being a bit of a nerd, I was able to play half a round of Hearthstone between rebuilds). I’m still not seeing the 500-700ms rebuild times.

I still think it has something to do with my machine, either via settings or hardware because my peers on my team have no issues. I used the different debug options listed in the WIP and, although really cool, didnt really know what to look for. There wasnt a single component, addon, etc that stood out as unusually long.


#10

For the record, heres the sort of times I’m seeing now.

Build successful - 42539ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
Babel                                         | 27750ms             
Funnel                                        | 8604ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
Babel (19)                                    | 27959ms (1471 ms)   
Funnel (54)                                   | 8811ms (163 ms)     


Build successful - 31025ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App                   | 18269ms             
TemplateCompiler                              | 8380ms              

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App (1)               | 18269ms             
TemplateCompiler (5)                          | 8407ms (1681 ms)    

file changed features/signup/route.coffee

Build successful - 33988ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App                   | 28727ms             

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App (1)               | 28727ms             

file changed features/signup/route.coffee

Build successful - 3526ms.

Slowest Trees                                 | Total               
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App                   | 606ms               
CoffeeScriptFilter                            | 354ms               
TreeMerger (app)                              | 228ms               
TreeMerger (preprocessedApp & templates)      | 221ms               

Slowest Trees (cumulative)                    | Total (avg)         
----------------------------------------------+---------------------
ConcatWithMaps: Concat: App (1)               | 606ms               
CoffeeScriptFilter (2)                        | 419ms (209 ms)      
Funnel (54)                                   | 257ms (4 ms)        
TreeMerger (app) (1)                          | 228ms               
TreeMerger (preprocessedApp & templates) (1)  | 221ms               
Babel (19)                                    | 198ms (10 ms)