Closed rwjblue closed 10 years ago
I have confirmed that this works properly when used within an ember-cli app (just used an ember-cli app as a test bed, this PR does not require ember-cli or anything).
@rwjblue asked me to post my test results: In my setup (Linux, SSD with rather slow processor) my build times dropped from ~450-650ms to not visible up to ~130ms, while initial builds havent changed as far as I can tell.
Also as expected: if I change a .sass file, compile times are "back to normal".
@joliss - Please review, when you have a moment.
Thanks, released in v0.2.3.
Even though libsass is insanely fast, we still see broccoli-sass in the "slow-trees listing" (at around 250ms) for every rebuild regardless of what files were changed.
This change updates to inherit from broccoli-caching-writer, which simply symlinks (using symlink-or-copy package) from the last runs cache directory if the input trees have not changed.
The result of this is that when changing files in a tree other than those provided to broccoli-sass the broccoli-sass tree rebuilds are nearly instant ( less than 10ms on SSD ).
In the future, we can even restrict extraneous rebuilds further by using broccoli-caching-writer's new include/exclude patterns to prevent cache invalidation when files inside the inputTrees but not related to the sass compilation are changed.
Closes #26.