LearnBoost/stylus — Issue #512: Feature Suggestion - Caching
Author: dcornu
Created: 2012-01-12 16:40:18+00:00
State: open

After several months of working with Stylus on a relatively large codebase, our compile times (around 5 seconds using the `--watch` flag) are a serious slowdown in our workflow (there's nothing like changing a single line and then refreshing the browser about 10 times waiting for the change to take effect).

Although compile times are just fine if you use single files, we use `@import` directives extensively to modularize the codebase and combine it into single files. Consequently, one file change leads to a number of other files being compiled too.

I have two thoughts on how to improve this:

1. My understanding is that Stylus doesn't do caching, however it seems this gives SASS a major performance boost (http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#caching) as it doesn't have to recompile files that haven't changed.

2. Add a timestamp to compilations in the CLI when using the --watch flag so you can actually see something happening when your terminal is filled with notices about the same file. CoffeeScript does this quite effectively.