mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 04:36:24 +00:00
Avoid redundant clearing of descendants when scanning dirs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
b2e7a2c42a
commit
3e44a0adae
1 changed files with 2 additions and 2 deletions
|
@ -401,10 +401,9 @@ impl Snapshot {
|
||||||
.entry(old_parent_inode)
|
.entry(old_parent_inode)
|
||||||
.or_default()
|
.or_default()
|
||||||
.insert(child.inode());
|
.insert(child.inode());
|
||||||
|
self.clear_descendants(child.inode(), &mut edits);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.clear_descendants(child.inode(), &mut edits);
|
|
||||||
}
|
}
|
||||||
edits.push(Edit::Insert(child));
|
edits.push(Edit::Insert(child));
|
||||||
}
|
}
|
||||||
|
@ -875,6 +874,7 @@ impl BackgroundScanner {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbg!(&job.path);
|
||||||
self.snapshot.lock().populate_dir(job.inode, new_entries);
|
self.snapshot.lock().populate_dir(job.inode, new_entries);
|
||||||
for new_job in new_jobs {
|
for new_job in new_jobs {
|
||||||
job.scan_queue.send(new_job).unwrap();
|
job.scan_queue.send(new_job).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue