gdu icon indicating copy to clipboard operation
gdu copied to clipboard

improvement of -n output

Open daniejstriata opened this issue 2 years ago • 4 comments

When doing a scan using -n you are presented with the following until the scan is completed.

image The directory structure looks like:

var
- data
-- batch1
--- Dir1
--- Dir2
--- Dir3
--- Dir4
-- batch2
--- Dir1
--- Dir2
--- Dir3
--- Dir4
-- batch3
--- Dir1
--- Dir2
--- Dir3
--- Dir4

When I am inside data and running the scan will it not be possible for gdu to start displaying the completed sizes for the directories as they are completed? I'd then have a better understanding of how much has been processed.

 ⠼ Scanning... Total items: 1,575,919 size: 41.4 KiB
Found:
 1.5 GiB /batch1
 ...

or

Found:
 1.5 GiB /batch1
 ...
 ⠼ Scanning... Total items: 1,575,919 size: 41.4 KiB

daniejstriata avatar Jan 18 '23 09:01 daniejstriata

Interesting idea. I think some more verbose output could be indeed beneficial.

dundee avatar Feb 03 '23 10:02 dundee

The problem is that we don't process the directories sequentially, but rather in random order and random depth. Which brings the speed of gdu. So it won't be easy to print some more verbose information about the subdirectories.

dundee avatar Feb 05 '23 18:02 dundee

Could it still print the top directory as it completes? Unless what you are saying implies that all the directories will complete roughly at the same time?

daniejstriata avatar Feb 06 '23 05:02 daniejstriata

We can try. In some cases it will complete at the same time. In some cases probably not.

dundee avatar Feb 07 '23 09:02 dundee