Hacker News new | past | comments | ask | show | jobs | submit login

"Watcher is extremely efficient. In most cases, even when scanning millions of paths, this library uses a near-zero amount of resources." Yea, maybe or maybe not and my first guess is maybe not.

This needs at least some bullet points on HOW it does this so efficiently so that I'll keep looking. A blanket statement like this means "they hope it is efficient" or "They want it to be efficient" or "It's good in some scenarios but not others".

With those additional bits, I have a reason to dig around the source.




Is this just using inotify on Linux?

If so, there are equivalent options, including systemd path units, incron, and the inotifywait utility, in addition to the C API.

The "man systemd.path" page does list explicit limitations of this kernel system call:

"Internally, path units use the inotify(7) API to monitor file systems. Due to that, it suffers by the same limitations as inotify, and for example cannot be used to monitor files or directories changed by other machines on remote NFS file systems." (Files modified by mmap() also don't trigger events.)

https://www.linuxjournal.com/content/linux-filesystem-events...

Windows busybox also has an inotifyd, which appears to do something similar.


You are right. I’ll make sure to give a deeper breakdown in the readme.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: