Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Small files hidden from view #62

Open
Ben-PH opened this issue Jul 5, 2020 · 7 comments
Open

Bug: Small files hidden from view #62

Ben-PH opened this issue Jul 5, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@Ben-PH
Copy link

Ben-PH commented Jul 5, 2020

Here is the display using ncdu:

--- /path/to/projects/shader_brot ------------------------------------------------------------------------
                         /..
    1.1 GiB [##########] /target                                                                          
  216.0 KiB [          ] /.git
  116.0 KiB [          ]  Cargo.lock
   20.0 KiB [          ]  LICENSE
   20.0 KiB [          ] /resources
   20.0 KiB [          ] /src
    4.0 KiB [          ]  README.md
    4.0 KiB [          ]  TODO.md
    4.0 KiB [          ]  Cargo.toml
    4.0 KiB [          ]  .gitattributes
    4.0 KiB [          ]  .gitignore

                       ┌───Item info──────────────────────────────────────────────┐
                       │                                                          │
                       │  Name: target                                            │
                       │  Path: /path/to/projects/shader_brot                     │
                       │  Type: Directory                                         │
                       │                                                          │
                       │     Disk usage:   1.1 GiB (1,180,995,584 B)              │
                       │  Apparent size:   1.1 GiB (1,174,963,573 B)              │
                       │                                                          │
                       │                              Press i to hide this window │
                       └──────────────────────────────────────────────────────────┘

here is the display in diskonaut:

 Total: 1.4G (2797 files), freed: 0 | /path/to/projects/shader_brot
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                        │
│                                                                                                        │
│                                                                                                        │
│                                                                                                        │
│                                      target/ (+2740 descendants)                                       │
│                                                                                                        │
│                                              1.4G (100%)                                               │
│                                                                                                        │
│                                                                                                        │
│                                                                                                        │
│                                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                                                                                        (x = Small files)

I ran the numbers:

  • small files take up 425984B
  • target takes up 0.999639430994373 of the directory (FP errors in that)

Only going by behavior shown, I suspect the % of the directory that target/ takes up is being rounded to a flat 100%, causing the render to exclude the other files.

@imsnif
Copy link
Owner

imsnif commented Jul 6, 2020

Yeah, that's pretty much it :/

Considering the limitations of rendering in the terminal, we can really only show an approximation of what's going on. My reasoning was that this would be good enough for the tool's main purpose (clearing up disk space).

Even if we didn't round things up, there is no physical room to render something so small in the terminal. I was originally thinking of including a message in these case. Something like "Some files too small to be rendered", but then I figured it might be too much eye-clutter.

Do you have any other idea how to solve this, or any thoughts on what you'd like to see in this case?

@Ben-PH
Copy link
Author

Ben-PH commented Jul 7, 2020

I can see how this bug could be acceptable in the context of clearing disk-space. For me, the core issue is that the information being presented is a "lie by omission", rather than "abstracting away low importance information." To illustrate, cell x = small files cell is revealing the presence of files, without cluttering up the information stream, and I like that. If there wasn't that cell at all, the user would have an information shortfall.

I would like to see something that shows diskonaut is choosing to not render directory content, similar to x = small files. An example solution: a 1-line cell in the bottom right, large enough for a message like this: Some files total size < Rounding Error. TAB to display. The user can hit tab, and those missed files are shown. This would only display when you don't have an x = small files cell.

As for how to solve, you would check: if <is not rendering x cell> && <no more cells to render> && <cells rendered != total dir entries> {<message that some files are within rounding error in size>}

@imsnif
Copy link
Owner

imsnif commented Jul 7, 2020

I think adding something like <X> files too small to render where the Small files legend is right now can make sense. Especially now that diskonaut has the ability to zoom and see those files.
I think having it near the current legend though might be a little confusing.

I think I'd like to see this happen after we take care of #15. Then we can conditionally show one or the other (or nothing) according to the situation. What do you think?

@Ben-PH
Copy link
Author

Ben-PH commented Jul 8, 2020

That sounds like a sensible approach. The key thing is to show the user that diskonaut is at least aware of the missing files (the ones even too small to be part of the x = small files group

@0x5c
Copy link

0x5c commented Apr 20, 2021

I just now discovered this tool, and I really like it.
But after 30 seconds of testing, I was looking for a button/key/option/etc to switch to a view that has the small files.
Maybe that could be a potential solution for this problem? Or maybe the view could be made to scroll up/down to reveal the rest of the files?

@0x5c
Copy link

0x5c commented Apr 21, 2021

Oh wow, found #73 and it makes sense now

The zoom works perfectly fine once one realises it's there (I think the suggestion in the other issue to have the message flash is great)

One potential solution to make the presence of small files more obvious is to have a fake-size box that says "there are small directories" even if its size would be exaggerated. One way of doing it would be to have it overlap the proportional boxes. It could even have a different colour.

┌──────────────────────────────────────────┬────────────────┐
│                                          │                │
│                                          │  go/ (+2155)   │
│                                          │                │
│                                          │  54.4M (13%)   │
│       .cache/ (+2920 descendants)        │                │
│                                          ├────────────────┤
│                                          │                │
│               296.0M (72%)               │ .local/ (+146) │
│                                          │   37.8M (9%)   │
│                                          │                │
│                                   ┌──────┴────────────────┤
│                                   │ There are small files │
└───────────────────────────────────┴───────────────────────┘

@0x5c
Copy link

0x5c commented Apr 21, 2021

Similar idea to the above, here's how Nodescope does it

image

The overall presentation is different, but the idea of an minimal size element for all files two small to be shown is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants