Skip to content

Improve navigation on slow (e.g. network) drives #1038

@hiinaspace

Description

@hiinaspace

Currently, navigating slow network drives with broot is pretty painful. Searching with character substrings is the main way to navigate in broot, and the searching can take several seconds to return (since it also searches subdirectories to some depth).

However, broot is actually fairly good at displaying slow network drives. It'll show immediate child subdirectories of the current directory pretty quickly, and if you either click a subdirectory with the mouse (or use the arrow keys to select the subdirectory and hit enter), broot is able to focus on that subdirectory quickly. It's annoying to have to use the mouse or arrow selection though, compared to the searching. And since broot is already displaying the subdirectories, it feels like searching should be able to filter on those subdirectories immediately when typing and change the selection to the top match, rather than waiting for the full search to return.

As a concrete example, /mnt/share is an SSHFS mount to a remote computer. If I run br /mnt/share, it'll show the directory tree:

> /mnt/share (highlighted)
  subdir-a
  subdir-b
  subdir-c
  subdir-d
  ...

If I want to get to subdir-d, my reflex is to type d. On a local drive this quickly highlights subdir-d:

/mnt/share
  subdir-a
  subdir-b
  subdir-c
> subdir-d
    some-other-subdir-stuff
    ...
  ...

But on a network share this results in

> /mnt/share 
  subdir-a
  subdir-b
  subdir-c
  subdir-d
  ...
Searching...

For several seconds until it eventually looks like the local share version. In the meantime though, I can still click on subdir-d or press the down arrow 4 times to select subdir-d manually.

Discussed in chat as well: https://miaou.dystroy.org/3490?broot#17983233

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions