shundhammer / qdirstat

QDirStat - Qt-based directory statistics (KDirStat without any KDE - from the original KDirStat author)
GNU General Public License v2.0
1.69k stars 122 forks source link

Colors of tiles - strategy for less gray #271

Open paul-hammant opened 1 month ago

paul-hammant commented 1 month ago

Screenshot from 2024-08-11 11-45-24

Dir is gray in the QDirStat depiction. It has child files that are 99.9% .PNG suffixed and 1% .TXT suffixed.

Could the directory's color be the same as the color of a tile for a .PNG suffixed file?

I appreciate the #85 discussed this before and files without suffixes are left as grey for good performance reasons - reading their contents would be costly vs making decisions based on their name only.

shundhammer commented 1 month ago

I discussed that in another issue some time ago (I can't find it right now; it wasn't #85).

The idea does have merit in general, but there are several unsolved problems:

shundhammer commented 1 month ago

BTW you can already experiment with

[Treemaps]
...
MinTileSize=1
...

in ~/.config/QDirStat/QDirStat.conf. The default is 3, but 1 gets you some less grey at the cost of rendering performance.

shundhammer commented 1 month ago

Related:

Lithopsian commented 1 month ago

I'm a little bit out of touch with the master QDirStat code, but is this happening because all the file tiles are (relatively) very small so that they're all below the 3-pixel limit?

My latest tiling algorithm renders the whole directory space with coloured file tiles regardless of the minTileSize, but never got merged. It "accumulates" small files until it has something that renders at minTileSize, then drops tiles until it accumulates enough for another tile, so the entire available space in each parent tile is filled even if the tiniest tiles are really just showing a bit of a random selection of the smallest files. So the only things that come out plain grey are empty directories and they are almost always small enough to become invisible in the treemap. Performance is better than the current code despite this. Running at minTileSize is acceptably fast although it doesn't look much different, the smallest tiles tend to just blend together because a 1x1 tile can't really be shaded.

Here's a portion of my ~/.cache which may be comparable with your tree. It shows Firefox cache (in white, the default for files with no extension, different to the directory grey) and thumbnails in blue. Screenshot_2024-08-11_14-11-18