OS/Platform name and version: MacOS 14.4.1 (M3 pro)
Rust version (if building from source): rustc --version: rustc 1.77.2
Notify version (or commit hash if building from git): 7.0.0
If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one:
Filesystem type and options:
On Linux: Kernel version:
On Windows: version and if you're running under Windows, Cygwin (unsupported), Linux Subsystem:
If you're running as a privileged user (root, System):
If you're running in a container, details on the runtime and overlay:
If you're running in a VM, details on the hypervisor:
What you did (as detailed as you can)
The performance has more overhead if multiple call Watcher#watch, watching 158 files take 88 ms at my local. The overhead look like the FsEventWatcher#stop and FsEventWatcher#run is call multiple times. It could be improve like this.
fn watch_multiple(&mut self, path: Vec<&Path>, recursive_mode: RecursiveMode) -> Result<()> {
self.stop();
for path in path {
let result = self.append_path(path, recursive_mode);
}
// ignore return error: may be empty path list
let _ = self.run();
result
}
The Watcher#unwatch API is also need to give similar API.
If here provide a API to do it, it could be nice. Thank you.
System details
rustc --version
: rustc 1.77.2What you did (as detailed as you can)
The performance has more overhead if multiple call
Watcher#watch
, watching 158 files take 88 ms at my local. The overhead look like theFsEventWatcher#stop
andFsEventWatcher#run
is call multiple times. It could be improve like this.The
Watcher#unwatch
API is also need to give similar API.If here provide a API to do it, it could be nice. Thank you.