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

How does this compare to Chokidar? #18

Open
davej opened this issue Feb 27, 2017 · 12 comments
Open

How does this compare to Chokidar? #18

davej opened this issue Feb 27, 2017 · 12 comments

Comments

@davej
Copy link

davej commented Feb 27, 2017

I wasn't able to form a conclusion from the README of how this differs from Chokidar and in what circumstances I would choose one over the other. A brief comparison would be useful.

@danielbayley
Copy link

https://blog.axosoft.com/2017/02/16/nsfw

@AndyOGo
Copy link

AndyOGo commented Jul 13, 2017

@danielbayley
May I ask you to mention some benefits over chokidar?

@AndyOGo
Copy link

AndyOGo commented Aug 9, 2017

for anyone who is curious
https://www.reddit.com/r/node/comments/4gxscp/stable_release_of_fast_recursive_file_watcher_for/

@ChrisFan
Copy link

ChrisFan commented Sep 13, 2017

Chokidar may cause EPERM problem on windows which is likely an issue of fs.watch. Since NSFW is based on Windows's native implementation, so I guess it should avoid this kind of issues ?

@AndyOGo
Copy link

AndyOGo commented Sep 13, 2017

@kumarharsh
Copy link

How does this compare to Watchman? https://github.com/facebook/watchman

One benefit I've seen of watchman over something like node-watch is that watchman is faster and consumes significantly less memory (~10M) even for big projects. Does this library offer something comparable?

@AndyOGo
Copy link

AndyOGo commented Mar 20, 2018

@kumarharsh
From my understanding the first obvious distinction is that watchman provides a service, which is then consumed by fb-watchman.
Which leads to two installations:

And that really no one wants in the node universe. One NPM install should get you what you need.
And that's the case with nsfw, it is specially build for node.

@kumarharsh
Copy link

Yeah, I got that, and it is actually rather irritating in the watchman style of installation - but it's still a one-time thing and the installation of watchman server isn't so big an issue for most people.

I wanted to know from a performance perspective, what kind of a memory footprint nsfw has for larger projects - if there's some benchmark for it.

@AndyOGo
Copy link

AndyOGo commented Mar 20, 2018

Well, I have never seen a benchmark neither. Just their Axosoft's blog post and the discussion at reddit. Did you read that? It tells you already allot of what makes chokidar slow.

Would be cool if some core contributors could join the discussion?
@implausible @xqp @reneme

@kumarharsh
Copy link

The benefit watchman does provide is that the client-server model lets me run webpack, linters, etc all on the same code which won't spawn different watchers everytime - thus not compounding the memory/cpu consumption issue. Of course, any library which doesn't use this kind of architecture can't really offer those kind of performance benefits. So, I just wanted to see how nsfw compared to other node watchers.

I couldn't find any perf benchmarks, but came to know about nsfw via the vscode repo, where a vscode-nsfw was being used in vscode.

@greggman
Copy link

greggman commented Apr 9, 2018

watchman having to install an OS level service is entirely a deal breaker for a great many projects.

@leonetosoft
Copy link

@AndyOGo
nor compares, nsfw can listen to the directory "C: " without consuming CPU. Try this on chokidar! This is a native package.

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

7 participants