6 ms·
Looking at Win32, it scans the whole directory periodically, right? I must miss something, but how can that be called efficient?
by mikulas_florek 4y ago
Looking at Win32, it scans the whole directory periodically, right? I must miss something, but how can that be called efficient?
- rasz 4y agoWait, it doesnt hook the OS file handling routines? it actually manually rescans the filesystem?
- deleted 4y ago[deleted]
- e-dant 4y agoIt 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 https://github.com/e-dant/watcher/issues/10
- mikulas_florek 4y agonot on windows (only platform I checked/care about)
- dwringer 4y agoSee here: https://news.ycombinator.com/item?id=33247735 https://news.ycombinator.com/item?id=33247735
- e-dant 4y agoIt’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 https://github.com/e-dant/watcher/issues/10
- mikulas_florek 4y agoI only mentioned Win32. There this library is very inefficient compared to ReadDirectoryChangesW, which consumes no CPU times when nothing changes.
- MichaelCollins 4y agoI 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.