shundhammer / qdirstat

QDirStat - Qt-based directory statistics (KDirStat without any KDE - from the original KDirStat author)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Treemap doesn't use all available space (grey space in treemap)

Jedi121ch195 opened this issue · comments

The Treemap doesn't use all space avaible for each folder but leaves grey areas in each zone :
image
At maximum zoom there's no problem the area is filled with tiles :
image

Yes, it does.

Those grey areas are directories where the size of those files are too small for any useful rendering.
By default that is 3 pixels on the smallest side - any tile below that will not be rendered.

This value can be configured in ~/.config/QDirStat/QDirStat.conf:

    [Treemaps]
    ...
    MinTileSize=3
    ...

tile-size-3

Default MinTileSize 3

tile-size-1

Customized MinTileSize 1

tile-size-0

MinTileSize 0 - no difference to 1

Beware that this will consume a lot more resources since all those tiny tiles now have to be taken into account, too.

I know it is tempting, and I had the same thought before: Why not do some rendering with the directory just to fill that empty space?

In my examples above that might indeed work - it's my /work directory where I keep my photos, my MP3 collection, my videos. Those directories are indeed filled with only one file type, so I could simply render each photo directory in cyan and each MP3 directory in yellow.

But that does not work at all in the general case: When a directory contains mixed content (which is the case in the vast majority of directories), what color should it get? The color of its predominant content maybe? Well, what if that cannot be determined since over half the files belong to the "other" (i.e. "no clue what that thing is") category? We'd need some generic "directory with small stuff" color, right?

Well, guess what, we have that. It's that grey you see. 😃

But that cannot be rendered just like the files because then you could not see a difference between a large file (like an ISO buried deep down in the directory hierarchy) and a large directory with a lot of small files. And that's what the treemap is there for in the first place.

Maybe rendering those areas not just in grey, but in some "grey noise" pattern might be an improvement. Let me think about that.

Experimenting with gradients for the directory tiles:

dir-gradient

That's far readable for me.
Would be great.

One reason why your WinDirStat experience is different is probably also the fact that Windows tends to have far less files than Linux: My Linux root filesystem has 338.000+ items including 258.000+ files in 8 GB while my Windows (XP) has 42.000+ items including 37.000+ files in 7 GB. Roughly 9 times as many files in roughly the same space means a lot more tiny files which contributes a lot to the "lots of stuff suppressed because of miniscule size" phenomenon.