Open
Description
What is the problem this feature will solve?
we did a test using fs.watch with a backgroud thread which write or modify files in watched-dir. The write or modify QPS is closed to 10K/s. We observed some fs event loss.We refered to fsnotify with Go, modify the source code of node to adjust the buffer size to 65536, the event loss is gone.
What is the feature you are proposing to solve the problem?
Windows ReadDirectoryChangeW and Linux inotify both need a buffer to read fs event. Now, the buffer size is const (4096 bytes) and can't be larger to process fs burst request well. So, could we add an option (the name may be --watch-buffer-size ) to tell node the suitable buffer size?


What alternatives have you considered?
Get the node's source code, modify the buffer size manually and rebuild a new binary, but it's better to add a command-line option to solve this problem.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Awaiting Triage