Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usePolling: false does not work on Mac #62

Closed
vojtajina opened this issue Oct 21, 2013 · 5 comments
Closed

usePolling: false does not work on Mac #62

vojtajina opened this issue Oct 21, 2013 · 5 comments

Comments

@vojtajina
Copy link
Contributor

This is more a question - what is the state of fs.watch vs. fs.watchFile ?

My observations...
linux:

  • usePolling false (fs.watch) seems to be working pretty well
  • it fires "add" event twice, but that's easy to deal with
  • much more efficient than stat polling (huge CPU usage)

mac:

  • after initial add, first change works, but subsequent changes are ignored
  • also it hits file descriptor limit very easily

windows:

  • ???
@dignifiedquire
Copy link
Contributor

For windows both versions are very inefficient and unreliable. The only solution I've found to get something decent on windows is using powershell scripts that directly interact with the event apis from windows.

@paulmillr
Copy link
Owner

Worked for me just great on windows, not sure. I confirm osx behaviour, that's why i didn't want to implement it

@dignifiedquire
Copy link
Contributor

For small projects it might work on windows, but using network drives + large folders that get copied in/out and moved around this breaks down very quickly.

vojtajina added a commit to vojtajina/karma that referenced this issue Oct 31, 2013
This config option is forwarded to chokidar. When set to `true` (default value is `false`), chokidar uses `fs.watch` instead of stat polling.

This seems to be finally working well on linux, however it does not work on Mac.
See paulmillr/chokidar#62

That's why I'm leaving it undocumented ;-)
@paulmillr
Copy link
Owner

Folks -- what do you think about using fs.watch by def on linux?

@vojtajina
Copy link
Contributor Author

@paulmillr I always use fs.watch on linux it works well and the CPU consumption is so much better. So I vote yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants