Slow scanning on Windows with big folder (compare to other tools such as TreeSize free)
This is a great tool and I'm considering replace my old tool set (TreeSize Free for example), but I'm not sure if it is just my issue or the app is not optimized yet.
I run dua on Windows 11 root disk folder such as C:\ and it take almost forever to scan completely. For comparison, I used TreeSize Free and scan whole C:\ folder, it took about less then 10 seconds.
I hope we can improve the speed of it and will be best simple disk analyzer tool I ever use
(I also test other tool such as dust and they have the same problem)
Version: Windows 11 dua dua-v2.32.2-x86_64-pc-windows-msvc
Not sure if #224 is related to
Thanks a lot for reporting!
It's amazing that the TUI works on Windows by now - I only tried it in Git bash and I it definitely isn't operational.
With that said, I recommend trying the -t 1 argument to see to what extend multi-threading is causing the issue.
Further, you could try pdu which can be much faster. It also supports a way to control the amount of traversal threads.
Maybe that helps to shed light on what's causing it.
Thanks. I measure each case as below:
TreeSize Free: ~13 seconds
dua i c:\
247 seconds
dua -t 1 i c:\
254 seconds
pdu
~30 seconds
It seems pdu don't have interactive UI which I love from dua. And it will also print a lot of annoy permission denied even though I run as administrator
Thanks for the numbers!
It seems like it doesn't win anything from multi-threading, which also makes it seem it's related to #224. Apparently there are trees which are a problem for the underlying jwalk crate, which has been a blessing and a curse thus far. The curse part is due to me not understanding it, and it's obvious that there is some overhead involved in it.
Maybe with AI it's possible to completely rewrite it just by saying what features are needed, and maybe get more test coverage as well.
Maybe this is something that can interest someone perusing this issue.
Thanks Byron, very dedicated answer. Unfortunately, I only know some basic Rust and that not enough knowledge to help here with the source code. Hope someone else will appear like a star ;)