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

optimise scanning code #20

Merged
merged 1 commit into from
Mar 5, 2020
Merged

optimise scanning code #20

merged 1 commit into from
Mar 5, 2020

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