Sass --watch from 3.4.5 becomes very slow on listening to file changes #1562

Closed
kunambi opened this Issue Dec 17, 2014 · 10 comments

Comments

Projects
None yet
7 participants
@kunambi

kunambi commented Dec 17, 2014

After I updated to the latest version, 3.4.9, I noticed that it took a long time after I've saved my stylesheet to have it compiled by sass. The compilation itself is very quick, but it takes 5-10 seconds to detect the changes. The delay is also noticeable with close to empty scss-files.

 Change detected to: files/css/style.scss # timestamp 14:42:12
      write static_source/css/style.css # timestamp 14:42:20

After rolling back the sass versions, I've noticed that this bug is introduced with version 3.4.5.

I run sass on Microsoft Windows [Version 6.1.7601] with ruby 1.9.3p551 (2014-11-13) [i386-mingw32]

@defaltd

This comment has been minimized.

Show comment
Hide comment
@defaltd

defaltd Dec 18, 2014

Are these local files or are they coming from a network directory? I had this very same issue with using files from a network folder.

defaltd commented Dec 18, 2014

Are these local files or are they coming from a network directory? I had this very same issue with using files from a network folder.

@kunambi

This comment has been minimized.

Show comment
Hide comment
@kunambi

kunambi Dec 23, 2014

These are all local files, haven't tried compiling over network shares.

kunambi commented Dec 23, 2014

These are all local files, haven't tried compiling over network shares.

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein Jan 9, 2015

Member

In 3.4.5 @nex3 changed the watcher to observe the current working directory (Commit e68d72b). My guess is that your current working directory has a lot of files or maybe it includes network shares as mentioned by @Stephn-R. That change addressed issues #1393 and #1411 so if we were to revert this, we'd need to find other ways to fix those.

Member

chriseppstein commented Jan 9, 2015

In 3.4.5 @nex3 changed the watcher to observe the current working directory (Commit e68d72b). My guess is that your current working directory has a lot of files or maybe it includes network shares as mentioned by @Stephn-R. That change addressed issues #1393 and #1411 so if we were to revert this, we'd need to find other ways to fix those.

@kunambi

This comment has been minimized.

Show comment
Hide comment
@kunambi

kunambi Jan 16, 2015

In my example there are no network shares involved (as stated in my previous comment), and the amount of files have not been more than 8.

In this current situation, upgrading to anything after 3.4.4 makes Sass unusable for developers on Windows, unless it's common to take 8-10sec to alt-tab between windows..

kunambi commented Jan 16, 2015

In my example there are no network shares involved (as stated in my previous comment), and the amount of files have not been more than 8.

In this current situation, upgrading to anything after 3.4.4 makes Sass unusable for developers on Windows, unless it's common to take 8-10sec to alt-tab between windows..

@nex3

This comment has been minimized.

Show comment
Hide comment
@nex3

nex3 Jan 17, 2015

Contributor

I suspect @chriseppstein is correct. I don't think this is making Sass unusable for all Windows developers—we would have heard much more about it if so—which suggests that it's specific to your configuration, and likely the size of your working directory. In that case there's not much we can do.

Contributor

nex3 commented Jan 17, 2015

I suspect @chriseppstein is correct. I don't think this is making Sass unusable for all Windows developers—we would have heard much more about it if so—which suggests that it's specific to your configuration, and likely the size of your working directory. In that case there's not much we can do.

@nex3 nex3 closed this Jan 17, 2015

@ideeaco

This comment has been minimized.

Show comment
Hide comment
@ideeaco

ideeaco Oct 19, 2015

Salut

  • I'm not so good at written English, skip writing mistakes -

The solution:
(For Linux it work instant, before that it take 20-40 seconds. I did not test on win or mac)

I. change the directory to your project root or to folder conteining the main .scss file -ex:
octavian@ubuntu-DQ35JO:~$ cd /var/www/scss/fifi/

II. from here run the ' scss --watch' for your .scss file in this folder and for output after ':' use full path -ex:
octavian@ubuntu-DQ35JO:/var/www/scss/fifi$ scss --watch myfile.scss:/var/www/mysite.me/css/myfile.css

! for import something in your main scss file use full path -ex:
// import gridle
@import "/var/www/scss/fifi/vendor/gridle/gridle";

The speed problem comes from ruby/scss or something '--watch' all the folders if you use the comand -ex:
octavian@ubuntu-DQ35JO:~$ scss --watch /var/www/scss/fifi/ideeaco.scss:/var/www/mysite.me/css/myfile.css

I notice when i delete some .scss files in another folder, ruby/scss or something react and thel me someting about .scss files from trash.

ideeaco commented Oct 19, 2015

Salut

  • I'm not so good at written English, skip writing mistakes -

The solution:
(For Linux it work instant, before that it take 20-40 seconds. I did not test on win or mac)

I. change the directory to your project root or to folder conteining the main .scss file -ex:
octavian@ubuntu-DQ35JO:~$ cd /var/www/scss/fifi/

II. from here run the ' scss --watch' for your .scss file in this folder and for output after ':' use full path -ex:
octavian@ubuntu-DQ35JO:/var/www/scss/fifi$ scss --watch myfile.scss:/var/www/mysite.me/css/myfile.css

! for import something in your main scss file use full path -ex:
// import gridle
@import "/var/www/scss/fifi/vendor/gridle/gridle";

The speed problem comes from ruby/scss or something '--watch' all the folders if you use the comand -ex:
octavian@ubuntu-DQ35JO:~$ scss --watch /var/www/scss/fifi/ideeaco.scss:/var/www/mysite.me/css/myfile.css

I notice when i delete some .scss files in another folder, ruby/scss or something react and thel me someting about .scss files from trash.

@narayanwaraich

This comment has been minimized.

Show comment
Hide comment
@narayanwaraich

narayanwaraich Jan 27, 2016

Had the same problem [ on Windows ], @ideeaco solution works for me.

Had the same problem [ on Windows ], @ideeaco solution works for me.

@arpanpatel

This comment has been minimized.

Show comment
Hide comment
@arpanpatel

arpanpatel Feb 11, 2016

great..@ideeaco solution work for me (on windows)

great..@ideeaco solution work for me (on windows)

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein Mar 2, 2016

Member

I found the proper fix for issues #1393 and #1411

Member

chriseppstein commented Mar 2, 2016

I found the proper fix for issues #1393 and #1411

@arpanpatel

This comment has been minimized.

Show comment
Hide comment
@arpanpatel

arpanpatel Mar 3, 2016

i started using prepros for sass compilation..it work great for me

i started using prepros for sass compilation..it work great for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment