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 option to disable sorting for file picker #11021

Open
kirawi opened this issue Jun 22, 2024 · 0 comments · May be fixed by #12672, #12688 or #11034
Open

Add option to disable sorting for file picker #11021

kirawi opened this issue Jun 22, 2024 · 0 comments · May be fixed by #12672, #12688 or #11034
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@kirawi
Copy link
Member

kirawi commented Jun 22, 2024

Ref #10995 (comment)

We can likely offer an option to disable the sorting and allow parallel transversal. It's not too useful since it's only a secondary tie breaker as soon as you enter a query.

@kirawi kirawi added C-enhancement Category: Improvements A-helix-term Area: Helix term improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors labels Jun 22, 2024
ArchUsr64 added a commit to ArchUsr64/helix that referenced this issue Jun 25, 2024
@ArchUsr64 ArchUsr64 linked a pull request Jun 25, 2024 that will close this issue
malor added a commit to malor/helix that referenced this issue Jan 26, 2025
Motivated by the discussion in helix-editor#10995. Sequential traversal is usually
very fast, unless it's Windows, or the files are on a (slow) remotely
mounted FS.

The existing logic of *not* moving injection of file names to a
background thread is preserved: if a directory can be traversed
in 30ms, all the work happens on the same thread sequentially.

To use `WalkParallel`, we need to give up on file name sorting, so
add a file picker option for that (defaults to sorting enabled to
not change the current behaviour). We _could_ make sorting work
for parallel traversal as well, but that requires eagerly traversing
the file tree and fully realizing the collection of file paths
in memory (so that we can merge partial results from independent
workers). It looks like lazy evaluation is preferred and allows
us to stop the work early (e.g. if the file picker window is closed).

Closes helix-editor#11021.
@malor malor linked a pull request Jan 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
1 participant