Skip to content

Conversation

tbillington
Copy link
Owner

This code manually iterates over walkdir::WalkDir from the walkdir crate to intelligently skip directories and files under certain conditions using skip_current_dir.

Criterion results

Before

scanner_bench           time:   [5.5149 s 5.6332 s 5.7884 s]

After

scanner_bench           time:   [135.92 ms 136.49 ms 136.96 ms]
                        change: [-97.578% -97.535% -97.499%] (p = 0.00 < 0.05)
                        Performance has improved.

Results in a 97.5% reduction in scan runtime on my pc.

@tbillington tbillington linked an issue Mar 5, 2020 that may be closed by this pull request
@tbillington tbillington merged commit 821a108 into master Mar 5, 2020
@tbillington tbillington deleted the optimise-scan branch March 5, 2020 09:18
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.

Optimise directory walk code
1 participant