Use leading flag set to true in debouncing events from extension trees#88051
Merged
alexr00 merged 9 commits intomicrosoft:masterfrom Jan 24, 2020
solomatov:tree-debounce-to-throttle
Merged
Use leading flag set to true in debouncing events from extension trees#88051alexr00 merged 9 commits intomicrosoft:masterfrom solomatov:tree-debounce-to-throttle
alexr00 merged 9 commits intomicrosoft:masterfrom
solomatov:tree-debounce-to-throttle
Conversation
alexr00
reviewed
Jan 6, 2020
- refactor test extHostTreeView's test to test prod behavior - fix a small bug in debounce
Contributor
Author
|
@alexr00, I refactored test to test actual production behavior. Found in the process a small bug in event merging in Event.debounce. |
Member
|
Thanks for making the changes! I'm not going to have a chance to take a good look at this for the next couple days, but I'll get back to it sometime next week. |
Contributor
Author
|
@alexr00 Could you please take a look? It would be very nice to have it in Jan release. |
Member
|
@joaomoreno are you ok with the changes in |
joaomoreno
reviewed
Jan 23, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The trees in the extension host has a problem: all events are debounced by 200ms, thus delaying changes by this amount. This PR sets the leading flag in debounce to true, thus removing this delay for well behaved extensions, i.e. extensions which fire just one change event at the right place, thus improving UX for them.
For not so well behaved extensions, this isn't that a big problem, we just make one more tree refresh, which, in my opinion, is a good tradeoff.