Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Support for polling interval with --watch #801

Closed
jareware opened this issue Mar 25, 2015 · 7 comments
Closed

Support for polling interval with --watch #801

jareware opened this issue Mar 25, 2015 · 7 comments

Comments

@jareware
Copy link

If using node-sass --watch in an environment where Gaze falls back to polling (e.g. networked file system) the polling can cause unnecessary CPU-load.

Would you consider some method for passing the interval option to Gaze?

@jareware
Copy link
Author

Related: #636

@am11
Copy link
Contributor

am11 commented Mar 25, 2015

Thanks for your feedback.

The watch feature of node-sass certainly needs a major overhauling, even besides the underlying dependency. There is an on-going PR, which will probably improve the situation: #782.

Currently, we are focusing on implementing the remaining features of libsass API and streamlining the build process. We will probably be able to visit it after v3.0.0.

Nonetheless, the PRs are always welcome; we still have time to include breaking changes in v3. Feel free to chip in. :)

@xzyfer
Copy link
Contributor

xzyfer commented Jun 11, 2015

I wonder what a good way to handle this via the CLI is. I don't want to duplicate all of Gaze's CLI options in our CLI.

Handling the API side of this is easy because we can simple pass through a watch object to Gaze.

@xzyfer xzyfer modified the milestones: Unknown, next.minor Sep 9, 2015
xzyfer added a commit to xzyfer/node-sass that referenced this issue Sep 21, 2015
In some environments the fs watcher falls back to polling for
changes. Both our current watcher and the proposed new watcher
both had support for user-defined polling intervals. I see no
reason not to add this for users who want extra control.

Fixes sass#801.
@saper
Copy link
Member

saper commented Sep 21, 2015

@jareware I've had some experience troubleshooting performance of NFS and I'd like to know more about your case before we take a stab at fixing it. What kind of environment is this? What is the performance issue you are experiencing? Are you running something like rpc.statd (if it's NFS indeed?)

@xzyfer
Copy link
Contributor

xzyfer commented Sep 21, 2015

I suspect this is not a performance issue. I suspect the 500ms polling interval just makes things feel sluggish relative the speed of the rest of the asset compilation tool chain. It's a feeling I can relate to, but I'm not convinced it's something we need to support. I opened a PR purely because it was very little overhead.

@xzyfer
Copy link
Contributor

xzyfer commented Sep 21, 2015

NVM I miss that this was a CPU issue. I doubt debugging this over GH issues will productive. Our slack channel is better medium https://libsass-slack.herokuapp.com/. @jareware feel free to join us here if the issue persists.

Closing this in the interim as it appears to be an isolated case.

@xzyfer xzyfer closed this as completed Sep 21, 2015
@xzyfer xzyfer removed this from the next.minor milestone Sep 21, 2015
@jareware
Copy link
Author

jareware commented Oct 4, 2015

@saper, @xzyfer, sorry I was away from civilization for a few weeks. :)

The issue was (as I recall it) that the polling interval was too high, essentially busy-looping when looking for changes, whereas I would have been completely happy with e.g. looking every 250ms. But there was no option for it in node-sass.

Not an issue for me anymore (environment changed), so no need to reopen for me.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants