Skip to content

Cache the mount table for -fstype #418

Closed

Description

@tavianator

#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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions