Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sass/compass compile time

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #167371
    magicspon
    Participant

    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
    Dave

    #167394
    Ed
    Participant

    Who 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.

    #167409
    magicspon
    Participant

    Who 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
    
    #167412
    magicspon
    Participant

    Hello,

    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#22810337

    I’ll take a look at grunt-contrib-sass .

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.