- This topic is empty.
-
AuthorPosts
-
April 2, 2014 at 2:22 am #167371magicsponParticipant
Hello,
Does anyone have any tips on reducing the compile time for compass…
I’m using the latest version of Sass and compass, and grunt-contrib-watch to run the compile.
At the moment it is taking about 5 seconds to compile, which is getting a little annoying.
I’ve slimed down my boilerplate to use less @imports.
Any other ideas?
Thanks
DaveApril 2, 2014 at 8:10 am #167394EdParticipantWho cares?
I guess the simplest way to reduce the compile time is to have less Sass… Are you re-compiling an entire library (like Foundation or Bootstrap) every time your Sass compiler is supposed to run? Make sure you’re only compiling the Sass you need each time.
My solution to this is to get a little more patience. Wanting everything to be lightning fast is bad for your health.
April 2, 2014 at 9:18 am #167409magicsponParticipantWho cares?
ummm… me!
I’m not using any frameworks, just my home baked mixins and objects/
The file i’m outputting is only 40Kb so there isn’t a huge amount of sass.
All of my sass partials get imported into one output file.
Running "watch" task Waiting... >> File "sass/app.scss" changed. Running "compass:dev" (compass) task unchanged css/img/ui-sd952ad1462.png overwrite css/app.css (5.334s) Compilation took 5.336s Done, without errors. Execution Time (2014-04-02 16:04:08 UTC) loading tasks 548ms ▇▇▇▇▇ 9% compass:dev 5.6s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 91% Total 6.2s
April 2, 2014 at 9:57 am #167412magicsponParticipantHello,
Yeah it does seem to be compass that is taking a fair amount of time.
As the moment every time I save a sass file it checks to see if the sprite file needs udpating.
Running "compass:dev" (compass) task unchanged css/img/ui-sd952ad1462.png
If I remove all of my sprite calls, mixins, et al then the compile time is greatly improved.
Do you know of anyway to get the grunt/compass/whoever to only compile/check sprite images if required. I suppose that in itself would be some kinda task! waa!
I tried to give libsass a whirl, but to no prevail:
http://stackoverflow.com/questions/22809998/grunt-sass-with-bower-compass-package-throwing-error-on-compile/22810337#22810337I’ll take a look at grunt-contrib-sass .
Thanks
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.