Skip to content

Commit

Permalink
Avoid unnecessarily sorting initial scan results
Browse files Browse the repository at this point in the history
  • Loading branch information
salihgerdan committed Mar 3, 2023
1 parent 0bfca63 commit 622ff72
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/filetree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ impl Default for Tree {
pub fn walk_into_tree(tree_mutex: Arc<Mutex<Tree>>) -> jwalk::Result<()> {
let root_name = { tree_mutex.lock().unwrap().get_elem(0).name.clone() };
let walkdir = WalkDir::new(root_name)
.sort(true)
.follow_links(false)
.skip_hidden(false);
// TODO: add parallelism here
let mut last_depth = 0;
let mut last_node = 0;
for entry in walkdir {
Expand Down

0 comments on commit 622ff72

Please sign in to comment.