Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4k stars 109 forks source link

Optimize UI responsiveness in scanning state #209

Closed unixzii closed 9 months ago

unixzii commented 9 months ago

The UI is very laggy while the scanning is in progress, and it makes the program almost unusable during the first few seconds of startup. The bottleneck is jwalk iterator, it may block the UI thread sometimes. In this PR, I alleviated the situation by some optimizations, and the UI is now super responsive at startup.

Here is what it looks like:

https://github.com/Byron/dua-cli/assets/3109144/3b06b888-c4ec-4c45-9468-36b0059cbe6c

Some implementation notes:

gosuwachu commented 9 months ago

I have tested this change and indeed it is now super smooth 🎉 Thanks!

Byron commented 9 months ago

Thanks a million, it works just as advertised!

It's so good to have this issue finally fixed!

And because we had to wait so long for this to be improved, I didn't want anybody to wait even longer: here is the new release