I migrated my grunt project to ember-cli, I found the time from file modification to liveload completion was so long, about 10 minutes.
After I installed ember-cli-wind
You ask
Why the ember-cli is so slow
It is not ember-cli per se that is slow, it is Broccoli. Reasons include:
Broccoli copies files instead of symlinking under Windows. To avoid this, run your builds in a command prompt with administrator privileges.
Broccoli is disk-intensive. To solve this, get an SSD.
Broccoli is processor intensive. To solve this, get a faster machine (preferably non-Windows).
Broccoli creates huge numbers of temporary files in tmp
, which can slow down performance. To solve this, clean out tmp
from time to time.
Broccoli is known to be inherently slow. You can find relevant questions on the broccoli site. To solve this, wait for the broccoli people to address performance issues, which is on their roadmap. Substantial improvements have already been made, so upgrade to the latest version of everything.
Broccoli rebuilds everything over and over again, including things which did not change. To solve this, manually tweak your build process to exclude certain things and do them manually as-needed. For instance, let's say you are bringing in a 200KB external JS package via bower, and app.import
'ing it in your Brocfile.js
. As a temporary work-around, and to see if it makes a difference, remove that file from the Broccoli world and load it directly in index.html
. The same applies to large CSS files.
Broccoli will run babel in a default installation. Babel is not that slow, but it does take time. To solve this, if you are not using ES6 syntax, remove the babel dependency.
Your virus scanner may be trying to scan the thousands of files Broccoli creates. ember-cli-windows
deals with this problem only for Defender. If you are using a different anti-virus package, to solve this add your dev directory to its list of places to skip.
For your reference, I have a small Ember project I build in an Ubuntu Virtual Box VM with Windows host on a fast machine with SSD, and builds take 2-3 seconds.
You may also want to consider asking this on an ember-cli list. You could also choose a different framework that does not bake in an immature and inefficient build system.