Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache the mount table for -fstype #418

Closed
tavianator opened this issue Jul 10, 2024 · 0 comments · Fixed by #419
Closed

Cache the mount table for -fstype #418

tavianator opened this issue Jul 10, 2024 · 0 comments · Fixed by #419

Comments

@tavianator
Copy link
Contributor

#408 implemented -fstype, but it's very slow since it re-reads the mount table every time:

Benchmark 1: find ~/code/linux -fstype btrfs
  Time (mean ± σ):      97.9 ms ±   3.2 ms    [User: 31.0 ms, System: 66.5 ms]
  Range (min … max):    91.4 ms … 104.6 ms    30 runs
 
Benchmark 2: ./target/release/find ~/code/linux -fstype btrfs
  Time (mean ± σ):      6.939 s ±  0.840 s    [User: 2.506 s, System: 3.826 s]
  Range (min … max):    6.098 s …  8.947 s    10 runs
 
Summary
  find ~/code/linux -fstype btrfs ran
   70.89 ± 8.89 times faster than ./target/release/find ~/code/linux -fstype btrfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants