Build takes 2 minutes


#1

Hey,

I have a decent laptop (2013 i7, 8 GB RAM but no SSD) and a new Ember App takes 100-120 seconds to build. Here is a sample output (using ember-cli 1.13.8 on Windows 7):

Build successful - 120060ms.

Slowest Trees                                 | Total
----------------------------------------------+---------------------
Addon#treeFor (Ember CLI QUnit - addon)       | 13405ms
Funnel: App JS Files                          | 12247ms
Funnel                                        | 11810ms
Funnel                                        | 10453ms
BroccoliMergeTrees                            | 9540ms
Funnel                                        | 8059ms
TreeMerger (ExternalTree)                     | 7041ms
Funnel                                        | 7020ms
Funnel                                        | 6500ms

Slowest Trees (cumulative)                    | Total (avg)
----------------------------------------------+---------------------
Funnel (36)                                   | 55434ms (1539 ms)
Addon#treeFor (Ember CLI QUnit - addon) (1)   | 13405ms
Funnel: App JS Files (1)                      | 12247ms
BroccoliMergeTrees (3)                        | 11559ms (3853 ms)
TreeMerger (ExternalTree) (1)                 | 7041ms

My colleague got similar problems on his computer. Creating a new app also takes forever (I think it was about 20 minutes).

What can I do to troubleshoot this problem?


#2

I’ve noticed ridiculous build times as well. I have a 2.5GHz, i5, 8 GB ram, running Yosemite and it takes at least a min (on good days) to rebuild after a silly change and upwards of two or three min sometimes. My teammate’s computer has 16gb of ram and his builds are instantaneous.

There is a known memory leak with broccoli so that may contribute to it.


#3

Hi,

my team also had problems with ember-cli build time under windows and we had really stuck with it for some time.

First of all you need to follow these instructions:

Basically you need to disable windows fs monitoring services(antivirus/indexing) for ember project directory and run ember-cli commands via powershell/cmd with admin privileges to enable symbolic links.

Also ember-cli team made great improvements with broccoli build process in last month, but it’s not released yet.

Nevertheless you can give a chance for master branch of ember-cli until the next release happened.

Usage of ember-cli’s master branch sped up incremental builds time for some of my colleagues up to 6 times.


#4

You need to do two things.

Install ember-cli-windows and follow the instructions in the readme

Run your command prompt as administrator (right click on the start menu CMD icon)

This will reduce your build times down to 10-20 seconds


#5

We just tried running ember-cli as administrator (since it was the fastest thing to try) and it decreased my build time to 3 seconds! That’s a fourtieth of my old build time! Thank you so much! :slight_smile:


#6

I am still unable to figure out why the issue is when running ember build on Windows.

I understand it gets resolved by doing SymLink thing and with admin access (But there are limitations when trying on company laptops with restricted privileges)

So I wanted to understand the root cause. Is the issue with some library like Brocoli & if yes, is that expected to be fixed sometime soon ?


#7

Is anyone other than me seeing this sort of performance on a mac?

I’m running El Captian, 2.5GHz, i5, 8 GB ram


#8

Many people including myself have good luck running Ember builds/servers in an Ubuntu guest using VM Virtual Box.