emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
4.96k stars 327 forks source link

fswatch is horribly slow on setting up inotify #321

Open cryptomilk opened 2 months ago

cryptomilk commented 2 months ago

neovim tired to improve the watchfunc for lsp servers and used fswatch. However fswatch is horribly slow on set up.

Doing the following in the Samba source code

fswatch --event=Created --event=Removed --event=Updated --event=Renamed --event-flags --recursive

takes ~90sec to just set up inotify before I get any notifications!

In comparison:

inotifywait --event modify --event create --event delete --monitor --rescursive

needs less than 1 second to set up and get notifications!