-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Do not show (running) when opening picker #8148
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the file transversal is longer shorter 30ms it will now be performed on the main thread. Spawning a thread can take a while (or rather it takes a while until that thread is scheduled) so the files can actually take a while to show up. This prevents the `(running)` indicator from briefly showing up when opening the file picker in a small directory.
pascalkuthe
added
E-easy
Call for participation: Experience needed to fix: Easy / not much
S-waiting-on-review
Status: Awaiting review from a maintainer.
A-command
Area: Commands
labels
Sep 2, 2023
poliorcetics
approved these changes
Sep 3, 2023
the-mikedavis
approved these changes
Sep 3, 2023
can confirm this works beautifully (probably should have mentioned this in the initial pr whoops) |
dgkf
pushed a commit
to dgkf/helix
that referenced
this pull request
Jan 30, 2024
* only stream from background thread if necessary If the file transversal is longer shorter 30ms it will now be performed on the main thread. Spawning a thread can take a while (or rather it takes a while until that thread is scheduled) so the files can actually take a while to show up. This prevents the `(running)` indicator from briefly showing up when opening the file picker in a small directory. * run partial cargo update
mtoohey31
pushed a commit
to mtoohey31/helix
that referenced
this pull request
Jun 2, 2024
* only stream from background thread if necessary If the file transversal is longer shorter 30ms it will now be performed on the main thread. Spawning a thread can take a while (or rather it takes a while until that thread is scheduled) so the files can actually take a while to show up. This prevents the `(running)` indicator from briefly showing up when opening the file picker in a small directory. * run partial cargo update
smortime
pushed a commit
to smortime/helix
that referenced
this pull request
Jul 10, 2024
* only stream from background thread if necessary If the file transversal is longer shorter 30ms it will now be performed on the main thread. Spawning a thread can take a while (or rather it takes a while until that thread is scheduled) so the files can actually take a while to show up. This prevents the `(running)` indicator from briefly showing up when opening the file picker in a small directory. * run partial cargo update
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-command
Area: Commands
E-easy
Call for participation: Experience needed to fix: Easy / not much
S-waiting-on-review
Status: Awaiting review from a maintainer.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8142
There were actually two issues here:
nucleo
had a bug where it would start the matcher but not wait for it to finish on the first call totick
. I fixed this upstream and also updated theCargo.lock
file a bit (using cargo update) to remove some duplicate dependencies.(running)
indicator would still always appear because starting a background thread takes a while causing a timeout. I fixed this by running the FS transversal on the UI thread for up to 30ms. This is short enough to not cause UI lag but long enough for most reasonable directories to finish.For the global search picker the problem persists, but since the global search runs eagerly there is no way to fix that (one we start the search it will always block the main thread until its complete). I think its ultimately not a huge issue.