-
Notifications
You must be signed in to change notification settings - Fork 114
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
performance: dua-cli full scan takes way longer than gdu #223
Comments
Thanks for reporting! Can you try to use root=<path-to-measure>
hyperfine -N -w1 -M2 "gdu $root" "dua -t1 $root" "dua -t2 $root" "dua -t4 $root" "dua -t8 $root" "pdu $root" The theory is that |
|
Previously each time the UI refreshes, every 250ms, it display entries but also check their metadata to assure they exist. This could lead to performance loss when the displayed folder has a lot of entries.
Thanks for the measurements, very interesting results! It's very interesting that On MacOS it scales much better, but the question remains why it's slow in interactive mode. I have a hunch and implemented a fix in #225, which you are invited to try out. If you'd say that the Something you could also check is how many threads PS: I have made a new release with the fix, and would hope it will improve the situation as this is the only guess I had: https://github.com/Byron/dua-cli/releases/tag/v2.27.2 . Should it still not release the handbreaks you'd probably need to instrument a run, but we get there when we get there. |
compiling for apple silicon on macos m2 throws an error while running
same error when explicitly checking out the tag (both on macos m2 and linux arm64): git clone https://github.com/Byron/dua-cli.git && cd dua-cli
git checkout tags/v2.27.2
cargo build --release Tried the Intel X86 binary from the releases — completes Ok: /tmp/dua-v2.27.2-x86_64-apple-darwin/dua i ~/projects
Sort mode: size descending Total disk usage: 149.07 GB
Processed 1743246 entries in 9.81s the original m2-binary (v2.20.1 arm64) still shows Entries: 1 in 0s (472/s) -> scanning <- 149.07 GB
Entries: 1743248 in 8.99s |
This is fixed now in
This typically means that it is indeed still scanning, but all threads are stalled, presumably. I recommend to try again building the latest version. Let's see. |
pulling, building and running latest thank you so much for taking the time to look into this — much appreciated! 🙏 |
Thanks so much for letting me know, it's much appreciated, too :). It's great to hear that the fix did indeed work, and that Closing, as it sounds like this issue is no more. |
Directory scanning with
dua i /some/folder
takes orders of magnitude longer compared to gdu even when setting-t <some-number-bigger-than-number-of-cpu-cores>
.Didn't do any proper benchmarks, but just an example, while
dua
shows progress info with number of scanned files around 64kgdu
in the same time on the same folder reaches around 300k+ files.dua-cli
takes minutes longer to complete a full scan.The huge speed difference has been observed with APFS (macos), HFS+ (macos), exFat (macos, linux), EXT4 (Linux with both armv7/arm64 and intel cpu's).
Note:
dua-cli
is still as fast or faster thanncdu
, so apparently it'sgdu
that does some serious optimizations to speed up the scan. On macos APFSgdu
full scan takes less time than calling ootb Apple's Finder Get Info on the same folder.The text was updated successfully, but these errors were encountered: