sass --watch directory also watches other directories causing high CPU usage #2006

Closed
tigrr opened this Issue Mar 2, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@tigrr

tigrr commented Mar 2, 2016

Suppose we have a directory structure like the following: sass, css, other files and folders.
sass --watch sass:css
watches not only "sass" directory, as you would expect, but the entire current working directory. Sass doesn't process them though. This causes high CPU usage, especially if you have many files in your active directory.

Perusing into other issues I've found out that this behavior is intended as a workaround to a few other Linux issues.

I am opening this issue:

  1. Once again, to invite developers' attention to it. (Please don't tell me it is all right this way, it is not.)
  2. To let users know about it, since this may consume their computer resources without their knowledge, and to propose a possible workaround, which is:

Workaround
Change to "sass" directory and from within run this instead of the command above:
sass --watch .:../css
Now files in the parent directory won't be watched.

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein Mar 2, 2016

Member

This was how it was always supposed to work, but there was a hard-to-find bug that watching the current directory papered over for most users. I found the hard-to-find bug and removed the hack we had added to watch the current working directory.

Member

chriseppstein commented Mar 2, 2016

This was how it was always supposed to work, but there was a hard-to-find bug that watching the current directory papered over for most users. I found the hard-to-find bug and removed the hack we had added to watch the current working directory.

@tigrr

This comment has been minimized.

Show comment
Hide comment
@tigrr

tigrr Mar 4, 2016

@chriseppstein , sorry, I am not sure what you're talking about. The reason I complained was very high CPU usage and messages from sass in the terminal about changes made (new files detected) in sass files in other directories.
Also, I'm using version 3.4.21

tigrr commented Mar 4, 2016

@chriseppstein , sorry, I am not sure what you're talking about. The reason I complained was very high CPU usage and messages from sass in the terminal about changes made (new files detected) in sass files in other directories.
Also, I'm using version 3.4.21

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