slow compile time

120 views
Skip to first unread message

arnoldbird

unread,
Jun 26, 2015, 3:12:06 PM6/26/15
to sass...@googlegroups.com
I just took over for another developer on a project, and SASS (or is it compass?) is taking 13 seconds to compile small CSS changes.  Though 13 seconds is not as long as times I've seen reported elsewhere, it's longer than the 2-3 seconds I'm used to.  This is the first time I've had to actually watch the compass output in my terminal, to ensure that the CSS change has been written before I refresh my browser.

I read that the @extend mixin can slow things down, so I commented out the only two @extend mixins in the project, and performance did not improve at all.

How to improve performance?

>>> Compass is watching for changes. Press Ctrl-C to Stop.
09:44:18.%3N AM modified styles/sass/_screen.scss
09:44:31.%3N AM    write styles/main.css (13.156s)
^[[B^[[B10:00:50.%3N AM modified styles/sass/_screen.scss
10:01:04.%3N AM    write styles/main.css (14.186s)

$ sass -v
Sass 3.4.14 (Selective Steve)
$ compass -v
Compass 1.0.3 (Polaris)


Brad Rice

unread,
Jun 26, 2015, 4:50:20 PM6/26/15
to sass...@googlegroups.com
If you have cache enabled, it should speed up the more you work on the project. Are the sass files broken down to have a lot of includes or is it just a huge sass file?

Check this out:

arnoldbird

unread,
Jun 30, 2015, 9:48:40 AM6/30/15
to sass...@googlegroups.com
Caching is enabled and files are being written/updated in the cache directory. 

The main.scss file contains 13 @import statements.  There is also a media query file that uses imports for each breakpoint's styles -- a total of 7 @import statements in that file.  This is more import statements than in other projects I've worked on, but doesn't strike me as a likely cause of the slow performance.

arnoldbird

unread,
Jun 30, 2015, 10:07:36 AM6/30/15
to sass...@googlegroups.com
The project uses susy, which I've not used before.  I found some complaints about susy performance, so I'm going to see if I can eliminate susy from the project.

arnoldbird

unread,
Jul 1, 2015, 1:36:34 PM7/1/15
to sass...@googlegroups.com
I ended up switching to libsass.  Compile times are down to ~1 second again.  Problem solved.



On Friday, June 26, 2015 at 3:12:06 PM UTC-4, arnoldbird wrote:
Reply all
Reply to author
Forward
0 new messages