Byron / dua-cli

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

"Automatic-Mode" - powered by PDU prune and display only high-value targets in interactive mode #93

Open Byron opened 3 years ago

Byron commented 3 years ago

That way one can seriously cut down the time it takes to find what is even worth deleting. As much fun as browsing the file tree might be it's faster to have pdu prepare the tree for you.

Ways of invoking pdu

The latter is preferred to not increase build times of dua.

KSXGitHub commented 3 years ago

Beware of 2 things:

Byron commented 3 years ago

Thank you. Especially the first point might have been a foot gun.

KSXGitHub commented 3 years ago

The latter is preferred to not increase build times of dua.

Both options have pros and cons.

Using the parallel_disk_usage library crate would eliminate runtime dependency on the pdu command, provide competitive performance (JSON serialization/deserialization has runtime cost), and allowing you to reuse existing JSON struct instead of reinventing the wheel. The only cost I can think of right now is greater compile time and binary size.

Using the pdu command is the UNIX way. The pros and cons of this option is the opposite of the library option.

KSXGitHub commented 3 years ago

Another note is that the structure of the JSON is not final. You may subscribe to https://github.com/KSXGitHub/parallel-disk-usage/issues/27 and https://github.com/KSXGitHub/parallel-disk-usage/issues/28 for potential changes.

Byron commented 3 years ago

Another note is that the structure of the JSON is not final. You may subscribe to KSXGitHub/parallel-disk-usage#27 and KSXGitHub/parallel-disk-usage#28 for potential changes.

Thank you, that will definitely help.

Byron commented 3 years ago

Needs https://github.com/KSXGitHub/parallel-disk-usage/issues/28#issuecomment-855176147 to continue.