-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
can't watch entire C drive using node 0.11 on windows #229
Comments
lol why are you trying to watch the entire C drive? chokidar works fine with node 0.11 on windows: https://ci.appveyor.com/project/es128/chokidar/build/14/job/qnhg9ij0jykxptce |
I'm watching an entire drive because
Anyway, there's nothing in common among the issue and my plans, so I think the title was changed inappropriately. That test doesn't show anything, because
|
why 0.11.15 and not 0.12.0? |
No it wasn't. You described problems with a very specific outlier use-case. The title you gave the issue is very misleading and generally false for typical usage.
Really? That's amazing. @bpasero you may interested to hear about this use case. So have you tried node 0.12 or io.js? |
Hm, I dont think I have seen this specific error under node 0.12. I actually did some testing today for #228 comparing node 0.10 and 0.12 in terms of performance and didnt hit issues. But the folders I tested were also all under my home directory with proper permissions to access. |
I don't think there's something like outlier use case when one is talking about generic library. I'd prefer to call it a missing test.
After listing several entries from the root of the drive,
Works relatively fine. |
What you're doing is very unusual. You should feel proud of it! 😀 I'll give it a try from a VM and see if I can get any insight into what's going on. It is definitely an issue in node. Chokidar might be able to do something to correct for it, but if it can't, it can't - and this will have to be taken up with the node project. In the meantime, I recommend you stick to node 0.10 or switch to io.js. |
The approach with recursive Anyway, |
@polkovnikov-ph I am with you (see #228). While I think scanning C: is a bit crazy, I see bad performance from watching large folders in general with chokidar. As you say, it all boils down in having to scan the entire folder recursively first because of the unacceptable implementation of fs.watch() in libuv. I think trying to solve this on the JS side of things will never really work. The right approach is to fix the mess in libuv. I added pull requests to enable recursive watching natively on windows (libuv/libuv#198) and a workaround for missing filenames during delete (libuv/libuv#199). Still, this is just the tip of the iceberg. Imho there are more bugs, and the fact that chokidar exists is a proof that lots of manual crafting is needed to get all events properly. Btw I have experience using node.js with edge and leveraging the C# file watcher class (https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx). It works nicely, consumes no memory and is instant. Since it is implemented on top of the same primitives libuv uses, libuv could do the same. |
Was it fixed? |
No, but the issue is outdated. If you can reproduce it with the latest versions of chokidar and node and still want attention paid to it, we could consider reopening. I think the main issue was permissions or special files at the root of the primary drive that would have to be stepped around (you could probably work around this now with some deliberate |
I will try this again on a weekend. I've finally went on implementing native C++ plugin over system APIs and boost.filesystem library then. It turned out even boost had that same nasty bug when enumerating contents of a directory that contains files with special access rights. I don't think there is much chokidar can do about that without resorting to reimplementing |
Right, it just depends. We could maybe find ways to skip over problematic entries seamlessly, but there may be barriers outside our control. You may also be interested in the watchman project, which now has a Windows implementation in alpha: https://facebook.github.io/watchman/ |
When running the following example on Node 0.11.15
we get something like this in the output
and then the program exits.
It seems that this is an issue with Node itself, but I'm not proficient to report it. Anyway, it seems that
chokidar
is a library that was meant to work a bit more stable that defaultfs.watch
, so you may be interested.The text was updated successfully, but these errors were encountered: