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

Add --builtin-filter-dirs #3464

Closed

Conversation

kelleyma49
Copy link
Contributor

@kelleyma49 kelleyma49 commented Oct 7, 2023

  • fzf's builtin filesystem walker is faster then overridding via FZF_DEFAULT_COMMAND, especially on Windows
  • If this switch is specified, fzf will read directories instead of files if FZF_DEFAULT_COMMAND is not specified and there's no input from tty

* fzf's builtin filesystem walker is faster then overridding via FZF_DEFAULT_COMMAND, especially on Windows
* If this switch is specified, fzf will read directories instead of files if FZF_DEFAULT_COMMAND is not specified and there's no input from tty
@junegunn
Copy link
Owner

Thanks, but I would rather not add options for file system traversal, because that is not really the responsibility of fzf.

Is it really not possible to find a performant external command on Windows?

@kelleyma49
Copy link
Contributor Author

I'm open to ideas, but using FZF_DEFAULT_COMMAND or passing through std-in is way slower than using the default walker in fzf.

@kelleyma49
Copy link
Contributor Author

I agree that design-wise it makes sense, but pragmatically it's just faster to walk the filesystem in native Go.

@kelleyma49
Copy link
Contributor Author

kelleyma49 commented Feb 3, 2024

Here's an example comparing the Window's dir built-in command (left side) vs. built-in go walker (right side):

fzfDiff

@junegunn
Copy link
Owner

junegunn commented Feb 4, 2024

Thanks. Is the performance difference due to the performance limit of dir, or is it a fundamental limitation of the pipe mechanism in Windows? I mean, can we achieve better performance by using another program that is faster than dir?

@junegunn
Copy link
Owner

Closed in #3649.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants