You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
First of all thanks for all the work on this library, it looks very promising!
I tried making a test program that creates many files in nested directories while a watch was set on the top level directory. My goal here was to see if notify would capture every single events.
From the results, it seems that a few events are getting dropped depending on the OS.
go version 1.11.4
This piece of code can be run using :
go run nested.go -depth 10
This will create a top folder that contains 10 nested folders, each having 1000 folders.
10 * 1000 files will be created at random places within that tree with a write on each of them and removed afterwards.
I apologise for the long piece of code :
2019/02/10 07:18:53 nested.go:106: All files create event were caught
2019/02/10 07:18:53 nested.go:111: All files written event were caught
2019/02/10 07:18:53 nested.go:118: Expected 10000 file removed, got 9348
On macOS I seem to be able to reliably catch all remove Events, but write & create seem to fluctuate (I ran that code many times)
On Windows Create and Write seem to work reliably, but remove are dropped.
Am I doing something wrong with the library or is that a bug ?
Originally I only had a 1000 buffered event channel and that seemed to make me drop a few create and write events on windows, so I increased it to 1 000 000 (which seems a bit much) and it seems to behave a bit better.
There is a -keep flag option that allows you to keep the files and folders generated if you'd like to check the tree.
Hope this makes sense to you :)
The text was updated successfully, but these errors were encountered:
I did some more digging and found the problem in macOS.
Basically the FSEvents API is sending a kFSEventStreamEventFlagMustScanSubDirs and it's being ignored in watcher_fsevents.go
I think that at the very least we should send that Event to the User if he subscribed to it so that he knows he needs to rescan the folder in question (and its sub folders), looking at the code it's not very hard to do and I'll probably submit a patch fairly soon for it.
Ideally this wouldn't happen, but that would mean finding the bottleneck and hopefully being able to remove it, I would have to do a lot more digging for that.
Hello,
First of all thanks for all the work on this library, it looks very promising!
I tried making a test program that creates many files in nested directories while a watch was set on the top level directory. My goal here was to see if notify would capture every single events.
From the results, it seems that a few events are getting dropped depending on the OS.
go version 1.11.4
This piece of code can be run using :
This will create a top folder that contains 10 nested folders, each having 1000 folders.
10 * 1000 files will be created at random places within that tree with a write on each of them and removed afterwards.
I apologise for the long piece of code :
I tried running it on macOS and on a Windows 10 VM and here are the results I get (numbers vary) :
macOS 10.4.2
Windows 10 VM
On macOS I seem to be able to reliably catch all remove Events, but write & create seem to fluctuate (I ran that code many times)
On Windows Create and Write seem to work reliably, but remove are dropped.
Am I doing something wrong with the library or is that a bug ?
Originally I only had a 1000 buffered event channel and that seemed to make me drop a few create and write events on windows, so I increased it to 1 000 000 (which seems a bit much) and it seems to behave a bit better.
There is a -keep flag option that allows you to keep the files and folders generated if you'd like to check the tree.
Hope this makes sense to you :)
The text was updated successfully, but these errors were encountered: