Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

Disk usage counts up 20 times a second

gelenmedya969b42eb911e
diff --git a/crates/rf-app/src/disk_usage.rs b/crates/rf-app/src/disk_usage.rs
index 11eea266..48408654 100644
--- a/crates/rf-app/src/disk_usage.rs
+++ b/crates/rf-app/src/disk_usage.rs
@@ -95,11 +95,12 @@ impl DiskUsageView {
&self.root
}
- /// Watches the walk: counters twice a second, the finished tree when it arrives.
+ /// Watches the walk: the counters 20 times a second (they are atomics: reading them costs nothing, and four updates a second
+ /// looked stuck next to the copy cards, a Discord report), the finished tree when it arrives.
fn poll(&mut self, cx: &mut Context<Self>) {
self._poll = Some(cx.spawn(async move |this, cx| {
loop {
- cx.background_executor().timer(std::time::Duration::from_millis(250)).await;
+ cx.background_executor().timer(std::time::Duration::from_millis(50)).await;
let Ok(done) = this.update(cx, |v, cx| {
let Some(scan) = &v.scan else { return true };
v.progress = scan.progress();