Ember-cli: Motivation of changing build tool from grunt to broccoli

Hi all,

I wanted to understand what the motivation was behind the ember-cli decision to move from grunt to broccoli.

As i understand, grunt is a task runner, while broccoli is a build tool.

But what are the implications of this distinction?

Is grunt slower, more cumbersome to configure?

As i see there is a great adoption of gruntjs in the community, so i am sure that there is a good reason why it happened?

Thanks,

David

Take a look on broccoli release announcement article and you will find some answers.

It’s because rebuilding things with grunt watch in EAK was too slow and prone to error. You should still use Grunt as a task runner though.

For us the switch was mostly driven by constantly bumping into file descriptor limits and the faster SASS compiler (libsass is written in C instead of Ruby). Overall, we were able to shave 50-60% off our incremental build times.

Weird. I am using ember-cli with broccoli and it takes about 15 seconds to build a basic app compared to less than 2 with grunt…

Are you on Windows? The way indexing works on Windows screws with Broccoli, and is a known issue. Even on pretty enterprisey stuff, I usually don’t see a build time over 400ms, and over half of that is usually SASS.

@ccarterc I’d be interested in seeing the output of your build. It should show whole the culprit(s) is/are.

For our largest app, our build times went form literally 60 seconds to 2-5seconds (depending on what has changed).

Prior to ember-cli, the story for sharing components was a complex one and something very few attempted. Now head on over to emberaddons.com and you can see the door it has opened :smile:

Indexing is turned off for the entire repo. I literally have one route, one controller, one template. It’s a brand new app and I just started. Build times are 15-30 seconds. Slowest trees shows about 3 seconds for es6 modules. @jasonmit @kylecoberly

Oh yeah and builds are triggered sometimes several times after making only one change to a file. Very annoying. Grunt worked out of the box. Broccoli is broken out of the box. Seems like a bad move to gain adoption.

@ccarterc ember-cli 0.1.5? Are you using any additional addons?

No addons, but I just found the snippet about opening the command console as admin… Crazy difference. Now under 4 seconds.

1 Like