Debounce Quick Access keystrokes before computing proposals#4144
Open
vogella wants to merge 1 commit into
Open
Debounce Quick Access keystrokes before computing proposals#4144vogella wants to merge 1 commit into
vogella wants to merge 1 commit into
Conversation
Contributor
Every keystroke scheduled the background compute job immediately and cancelled the in-flight one, so fast typing triggered a compute per character even though only the final filter matters. Collapse a burst of keystrokes into a single computation: the modify listener now schedules the compute job with a 100 ms delay, and each new keystroke cancels the still-sleeping job from the previous one, so only the last keystroke in the window actually computes. The other callers (initial open, show-all toggle, resize) keep zero delay. The job is scheduled for the whole delay, so it stays visible to COMPUTE_JOB_FAMILY and tests that join that family still observe the pending compute.
81466ea to
b5fad35
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Quick Access scheduled a fresh background compute on every keystroke and cancelled the previous one, so fast typing kicked off a computation per character when only the final filter matters.
This debounces the keystroke path: the modify listener now schedules the compute job with a 100 ms delay, and each new keystroke cancels the still-sleeping job from the previous one, so only the last keystroke in a burst actually computes. Initial open, the show-all toggle and resize keep their immediate behavior.
The job is scheduled for the whole delay, so it stays visible to the compute job family and
QuickAccessDialogTeststill joins that family deterministically. All ten tests in that class pass locally.