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

Rewrite to use walkdir instead of recursion #13

Merged
merged 2 commits into from
Apr 24, 2018
Merged

Rewrite to use walkdir instead of recursion #13

merged 2 commits into from
Apr 24, 2018

Conversation

bootandy
Copy link
Owner

Advised to use walkdir by burntsushi as using recursion on file systems
can blow the stack.

walkdir is slower but allows the code to be cleaner and more reliable

Also experimented with ignore but locking the hashmap resulted in
similar performance to walkdir but with much uglier code.

@bootandy bootandy force-pushed the walkdir2 branch 2 times, most recently from 79cb6ac to 9a46e4e Compare April 23, 2018 14:43
Advised to use walkdir by burntsushi as using recursion on file systems
can blow the stack.

walkdir is slower but allows the code to be cleaner and more reliable

Also experimented with ignore but locking the hashmap resulted in
similar performance to walkdir but with much uglier code.
Fixes #9
#9

Instead of printing the all sub tree leaves only the last leaf is now
printed. See readme change for example

The flag '-p' was added to print the sub tree the old way
@bootandy bootandy merged commit 6d62cfb into master Apr 24, 2018
@bootandy bootandy deleted the walkdir2 branch April 24, 2018 14:41
@bootandy bootandy mentioned this pull request Apr 24, 2018
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