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

Don't count hidden special paths when computing dir sizes #331

Closed
Canop opened this issue Jan 27, 2021 · 7 comments
Closed

Don't count hidden special paths when computing dir sizes #331

Canop opened this issue Jan 27, 2021 · 7 comments

Comments

@Canop
Copy link
Owner

Canop commented Jan 27, 2021

There's a good example in this issue: #330

What's required here is to not take into account the hidden directories when computing sizes.

@bluz71
Copy link

bluz71 commented Feb 3, 2021

Just a thought, if this is proving a challenge to implement, maybe don't compute and display overall size whilst in whale-spotting mode? That would be circled item in this screenshot:

105938929-4e588e80-60ac-11eb-8f16-f83e079d88ed

Or maybe provide a flag to disable it?

As noted in #330, the addition of that size heading slowed down my whale-spotting by about 50x due to a large and slow encrypted CIFS network directory in my home (via PAM mount).

Cheers.

@Canop
Copy link
Owner Author

Canop commented Feb 3, 2021

The problem isn't really the total size of the root, because you'd have to compute the size of /home/dennis when looking at / anyway. There no really any other solution than to check for all subpath, while walking the tree, whether it's a special path.

I'll test and see the impact on performances.

@bluz71
Copy link

bluz71 commented Feb 3, 2021

The impact on performance will vary depending on the size and speed of the hidden directories. I only whale spot in my home directory.

In my case the encrypted CIFS volume that I mount in my home directory runs about 4 times slower than a traditional spinning hard disk (network speed loss and decryption-in-NAS loss). About 28MB/s max (often slower than that).

It is about 1.5TB in size. I don't want whale spotting to look at this directory at all, it is big and ridiculously slow.

Version 1.0.7 computed whale-spotting for my home directory in about 4 or 5 seconds.

Version 1.0.8 takes about 90 - 120 seconds, related to that top-left size indicator walking the NAS (which I can hear crunching).

Hidden directories are bad news.

Cheers.

@Canop Canop closed this as completed in de3e312 Feb 3, 2021
@Canop
Copy link
Owner Author

Canop commented Feb 3, 2021

I've pushed the change but it can still be considered a little experimental and isn't 100% sure to find its way to the next release.

I'd like confirmation it's OK.

@Canop Canop reopened this Feb 3, 2021
@bluz71
Copy link

bluz71 commented Feb 4, 2021

@Canop,

I built broot with your recent commit de3e312.

Excellent, it solves the issue. Runs very fast, like 1.0.7, by ignoring my slow-duper NAS drive.

Looks great to me. Many thanks.

P.S. I hope you include this.

@Canop
Copy link
Owner Author

Canop commented Feb 5, 2021

It's now in broot v1.2.2

@Canop Canop closed this as completed Feb 5, 2021
@bluz71
Copy link

bluz71 commented Feb 5, 2021

I greatly appreciate that @Canop.

Best regards.

joebonrichie pushed a commit to solus-packages/broot that referenced this issue Aug 14, 2023
Summary:
update broot to latest upstream release

Changelog:
- special paths in "no-enter" or "hide" aren't counted when summing sizes or dates. It's a compromise: it makes all sums a little slower, especially if you have a lot of special paths or complex ones, but it allows skipping over the very slow disks and thus makes some cases much faster - Fix [#331](Canop/broot#331)
- br fish shell function uses shell completion of broot
- tree height in `:pt` now applies even when there are more root items (thus truncating the tree) - Fix [#341](Canop/broot#341)
- fix the F5 and F6 shortcuts (copy and move between panels) in the default configuration

Test Plan:
- install br function
- run br in multiple directories
- open files using the explorer
- search for files using the explorer
- navigate directories using the explorer

Reviewers: #triage_team, JoshStrobl

Reviewed By: #triage_team, JoshStrobl

Subscribers: JoshStrobl, sethfl

Differential Revision: https://dev.getsol.us/D10496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants