Skip to content

perf: replace pool hasher with xxh3#810

Merged
JohnTitor merged 2 commits intonotify-rs:mainfrom
JohnTitor:content-hash
Feb 14, 2026
Merged

perf: replace pool hasher with xxh3#810
JohnTitor merged 2 commits intonotify-rs:mainfrom
JohnTitor:content-hash

Conversation

@JohnTitor
Copy link
Member

Description

Implement content hashing with xxh3 to improve performance.

With this change, the below benchmark shows positive results:

  • Baseline: 4.640 ms
  • After: 2.765 ms (40.4% less time)
let tmp = TempDir::new().expect("tempdir");
write_files(tmp.path(), 2_000, 4 * 1024);

let mut watcher = PollWatcher::new(
   |_event| {},
   Config::default()
      .with_compare_contents(true)
      .with_manual_polling(),
)
.expect("create watcher");
watcher
   .watch(tmp.path(), RecursiveMode::Recursive)
   .expect("watch");

Related Issues

@JohnTitor JohnTitor merged commit eb7a335 into notify-rs:main Feb 14, 2026
17 checks passed
@JohnTitor JohnTitor deleted the content-hash branch February 14, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant