broot
broot copied to clipboard
broot hangs on a large nested directory
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.
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 ?