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

broot hangs on a large nested directory #807

Open
sschuldenzucker opened this issue Dec 6, 2023 · 1 comment
Open

broot hangs on a large nested directory #807

sschuldenzucker opened this issue Dec 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sschuldenzucker
Copy link

When I open broot in my home directory (with a lot of nested stuff under it), at first it works fine but at some point it'll hang completely: I can't add/delete letters or quit or cancel; Ctrl+C doesn't work; need to kill using kill from another terminal.

This occurs consistently in my home directory (though it's probably hard to reproduce for someone else :/).

I think the hanging occurs after typing a few letters, where there are not so many matches in shallow levels below anymore and broot recurs deeper and deeper into the hierarchy trying to find more matches to show.

It seems unavoidable that this is slow, but the hangup shouldn't occur.

System Information

  • broot 1.30.0
  • broot config: default
  • MacBook Pro M2 Max
  • MacOS Sonoma 14.1.1
  • Terminal: Kitty with nushell; also tried with the default MacOS Terminal with zsh, same result.
  • I guess it's possible that some app has put some funky read-from-the-network-on-demand filesystem somewhere below my home directory but I'm not sure how to find out tbh.
@sschuldenzucker sschuldenzucker added the bug Something isn't working label Dec 6, 2023
@Canop
Copy link
Owner

Canop commented Dec 6, 2023

Such a freeze isn't "normal". I mean it's not just broot being slow to explore, but it probably means that a system call (eg read_dir or metadata) never ends. It's not really easy to handle. Maybe having a watcher thread kill broot when it happens would be the best solution.

As for finding what's the failing directory, I know by experience it's not easy, even if you add log statements before every system calls. Tree building being parallel doesn't help. Can you try launching BROOT_LOG=debug br -s ~, navigate without search, and see if you find the culprit, either directly in broot or in the generated broot.log file on freeze ?

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

2 participants