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

Add fsevent support using bin/fsevent_watch executable #5

Closed
lancejpollard opened this issue Dec 3, 2012 · 5 comments
Closed

Add fsevent support using bin/fsevent_watch executable #5

lancejpollard opened this issue Dec 3, 2012 · 5 comments

Comments

@lancejpollard
Copy link
Contributor

Hey,

I am very excited about your gaze module and your solution to the watcher issues with node/grunt.

One thing is though, watching large directories using fs.watch - even with all the improvements gaze has made - is still very processor intensive (on a Mac at least).

The solution to this problem is using FSEvent on the Mac. You can easily do that by downloading the following binary from the ruby rb-fsevent project:

https://github.com/thibaudgg/rb-fsevent/blob/master/bin/fsevent_watch

Detailed usage information here:

guard/rb-fsevent#38 (comment)

By integrating this FSEvent binary for Mac users, CPU usage stays well below 1% even on enormous directories. Currently fs.watch (using gaze, chokidar, or others) hits the CPU hard. For modest sized git repos (watching at the root, such as on the Tower.js project to compile coffeescripts), it uses more than 75% while the watch process is running.

Is this something you're interested in? I can help integrate if desired, let me know. Thanks!

@shama
Copy link
Owner

shama commented Dec 3, 2012

Yes totally. I've only briefly looked in fsevent but looked very promising. Help on this would be very much appreciated.

@shama
Copy link
Owner

shama commented Dec 3, 2012

FWIW, I'd prefer fsevent implemented as a native binding (and a separate lib). I'm still new to bindings so don't expect anything soon. ;)

@shama
Copy link
Owner

shama commented Dec 7, 2012

It appears FSEvents have landed in node v0.9.2. Here is the implementation.

@shama
Copy link
Owner

shama commented Jan 9, 2013

Closing as it appears this has landed into node. :D

@shama shama closed this as completed Jan 9, 2013
@lancejpollard
Copy link
Contributor Author

Awesome :D

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

No branches or pull requests

2 participants