When I run omega-guard and make changes to a scss file, omega-guard will recompile and write every single css file. How can I set it so it would skip unchanged files as in http://youtu.be/XF_LaSfua8Y?t=4m23s

I followed this tutorial to install bundler: https://www.drupal.org/node/2204227

I have the same issues weather I run omega-guard or bundler exec guard.

I'm honestly completely lost and can't find a single person with a similar issue, not only for omega-guard but guard in general.

Comments

nept’s picture

Issue summary: View changes
nept’s picture

Issue summary: View changes
osopolar’s picture

The same happens to me calling bundle exec guard. Would be nice to get this fixed as waiting until everything is compiled it is very time consuming. After a change to a sass file I have to wait more than 8 seconds to compile everything (I already commented out no-query stuff to speed it up otherwise it's the double time to wait).

pkiff’s picture

This works as designed for me using 7.x-4.3, so there must be something else at play aside from just running bundle exec guard and an out-of-the-box 7.x-4.3. Omega guard is compiling your normalize.css every time?

I don't know why this would be happening.

I would note that by far the largest culprit for compile time is the main styles.css file, which will necessarily need to compile fully with each and every SASS edit. I commonly experience 10-20 second compile times - or even longer when working on a slower machine (2GHz DualCore Intel Merom processor).

osopolar’s picture

My site runs in a virtual machine the files are exported by the host as nfs share, but I am developing on the host and have bundle exec guard running on the host (mac os). This should be no problem as guard don't need to know anything about drupal, everything is there, in the file system.

So what else could it be? the only thing guard does is "Compile on start" and call "compass watch". So I guess it depends on compass. My compass version is 1.0.3 (using omega 7.x-4.3+8-dev).

10-20 second compile time

This wouldn't be acceptable for me. To see changes I compile every couple of minutes, I couldn't wait so long.

pkiff’s picture

10-20 second compile time

This wouldn't be acceptable for me. To see changes I compile every couple of minutes, I couldn't wait so long.

Heh, yeah, I agree that is a long time, and unacceptable for some. There are strategies to reduce this time, but lots of folks suffer through similarly long compile times with SASS/Compass projects that have nothing to do with Omega. Ruby is commonly cited as the core culprit that drags SASS/Compass compile times down...

To track down why compass is compiling all the files instead of only changed ones, you might try just running compass watch (instead of drush omega-guard or drush ogrd or whatever). Also, you might try running it in your VM and seeing if your file system is somehow tricking compass into thinking that files have changed when they have not.

osopolar’s picture

As I change files on host and compass is running on host the vm shouldn't be the problem. Anyway I tested there to, but compass watch does not work there, as it don't get the file changes. On the host this seems to work fine compass watch detects the changes (see below), but it still builds everything:

compass watch -e development
>>> Compass is watching for changes. Press Ctrl-C to Stop.
    ...
 modified sass/components/content/_article.scss
    write css/subtheme.normalize.css
    write css/subtheme.normalize.css.map
    write css/subtheme.styles.css
    write css/subtheme.styles.css.map
    ... and so on.

Anyway, I don't think that it is worth to spend much time in this. I am thinking about replacing ruby with libsass, which should be at least 10 times faster (there are some tutorials on this i.e. here and here). There is also some Information in this omega issue: #2240137: Recommendation for Sourcemap Supported Susy/Compass Config.

fubhy’s picture

I added a very lightweigt LibSass based starterkit to Omega today and named it "Default". The Ruby based Starterkit previously named Default is now called "Dusty".

Was about time.

pkiff’s picture

Great! I haven't built something with Omega in a while, and like osopolar, I was thinking that for my next project I might try replacing ruby with libsass on my own, but it will be a lot easier to try out a new starterkit and then tweak as necessary.

Thanks for the update.