Closed chrisnicola closed 12 years ago
Just did a quick test, definitely faster with the responsive import left out.
Could be related to this issue: https://github.com/chriseppstein/compass/issues/516
Yea if you switch it to import just the responsive it's fine. When you import both it slows down. Also looking into this.
You need to import both though right?
Yes. Just mean it's not something in the responsive.scss file as far as I can tell. Digging into compass and sass to see where the problem is.
I don't know where in the codebase this is happening, but importing compass_twitter_bootstrap makes my asset compilation much slower. Without, my CSS compiles in about 4 seconds; with, it takes about 13 seconds.
It would appear that it's related to https://github.com/chriseppstein/compass/issues/516 , as the CSS generation is very fast using compass compile - it's only slow in the assets pipeline. For now, I'm going to use compass watch
with css_dir = "public/assets" .
The fix to nex3/sass#337 actually fixes this completely for me. Just found it.
You'll need to use the master branch in your Gemfile.
gem 'sass', git: 'git://github.com/nex3/sass.git'
That does seem to speed things up, but compilation through the assets pipeline is stil ~4 times slower than compass compile
.
The asset pipeline does more than what compass compile is doing by itself as I understand. First it's compiling gzipped versions as well as uncompressed versions. It is also parsing the files looking for rails specific directives like "image_url" and stuff.
If you don't mind checking compiled assets into your code base then it's always going to be faster to use compass. I'm deploying to Heroku so my main concern was deployment times since Heroku runs the compile task. I also don't like checking compiled files of any kind into source control. Too much noise in the change logs.
Closing this issue, since it appears to be largely fixed and has nothing to do with compass_twitter_bootstrap anyways.
I agree with you on the asset pipeline doing more, but including compass_twitter_bootstrap takes me from 1.6 seconds to 5.0 seconds (compiling with the asset pipeline). That's not necessarily relevant to this issue, but it does mean that this library is a lot slower than, say, Compass itself.
I have not been able to ascertain what the exact cause is but including both compass_bootstrap_twitter and compass_bootstrap_twitter_responsive seems to have an extraordinarily long compile time. Much longer than pre-2.0. I'm going to run some tests to see if it is just the responsive part or the core part.