[PR #13] [MERGED] Rewrite to use walkdir instead of recursion #253

Closed
opened 2026-06-08 11:26:28 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bootandy/dust/pull/13
Author: @bootandy
Created: 4/23/2018
Status: Merged
Merged: 4/24/2018
Merged by: @bootandy

Base: masterHead: walkdir2


📝 Commits (2)

  • 24c97ef Rewrite to use walkdir instead of recursion
  • 803934d By default only print last leaf of path

📊 Changes

10 files changed (+301 additions, -305 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 Cargo.lock (+20 -0)
📝 Cargo.toml (+1 -0)
📝 README.md (+37 -27)
📝 src/display.rs (+112 -58)
src/lib.rs (+0 -68)
📝 src/main.rs (+12 -7)
📝 src/tests.rs (+68 -43)
📝 src/utils/mod.rs (+45 -88)
📝 src/utils/platform.rs (+5 -14)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bootandy/dust/pull/13 **Author:** [@bootandy](https://github.com/bootandy) **Created:** 4/23/2018 **Status:** ✅ Merged **Merged:** 4/24/2018 **Merged by:** [@bootandy](https://github.com/bootandy) **Base:** `master` ← **Head:** `walkdir2` --- ### 📝 Commits (2) - [`24c97ef`](https://github.com/bootandy/dust/commit/24c97ef92ff7f33021b5dcaf1a85b901a300bdeb) Rewrite to use walkdir instead of recursion - [`803934d`](https://github.com/bootandy/dust/commit/803934d84b6747a2b859c28ff44b163bc44d3705) By default only print last leaf of path ### 📊 Changes **10 files changed** (+301 additions, -305 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `Cargo.lock` (+20 -0) 📝 `Cargo.toml` (+1 -0) 📝 `README.md` (+37 -27) 📝 `src/display.rs` (+112 -58) ➖ `src/lib.rs` (+0 -68) 📝 `src/main.rs` (+12 -7) 📝 `src/tests.rs` (+68 -43) 📝 `src/utils/mod.rs` (+45 -88) 📝 `src/utils/platform.rs` (+5 -14) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-06-08 11:26:28 +03:00
zhus closed this issue 2026-06-08 11:26:28 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#253