Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looking at Win32, it scans the whole directory periodically, right? I must miss something, but how can that be called efficient?


I don't know about efficient, but at least it sounds reliable. I'm at my wit's end with trying to figure out why KDE's Dolphin can't reliably watch a directory for new files, frequently (but not always) forcing me to F5 to see new files.


It’s efficient because it beats kqueue while reporting events accurately.

A proper benchmarking program is in the works, however manual testing does show only minimal resource usage.

For more, see this issue: https://github.com/e-dant/watcher/issues/10


I only mentioned Win32. There this library is very inefficient compared to ReadDirectoryChangesW, which consumes no CPU times when nothing changes.



Wait, it doesnt hook the OS file handling routines? it actually manually rescans the filesystem?


It does one or the other. There are concerns about OS filesystem event hooks.

The current solution isn’t ideal, and is being addressed here: https://github.com/e-dant/watcher/issues/10


not on windows (only platform I checked/care about)




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

Search: