[Property Editor] Debounce calls to the Analysis Server for editableArguments#9017
Merged
elliette merged 5 commits intoflutter:masterfrom Mar 13, 2025
Merged
[Property Editor] Debounce calls to the Analysis Server for editableArguments#9017elliette merged 5 commits intoflutter:masterfrom
editableArguments#9017elliette merged 5 commits intoflutter:masterfrom
Conversation
...evtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_controller.dart
Outdated
Show resolved
Hide resolved
...evtools_app/lib/src/standalone_ui/ide_shared/property_editor/property_editor_controller.dart
Outdated
Show resolved
Hide resolved
kenzieschmoll
approved these changes
Mar 11, 2025
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.
Fixes #9004
Because IntelliJ does not support document versions, the
ActiveLocationChangedevent will always include anulltext document version identifier.Because of this, this PR:
ActiveLocationChangedevents if the text document version is notnullCurrently VS Code debounces the
ActiveLocationChangedevents with a duration of 200 ms. In DevTools, I've added further debouncing for the requests to the Analysis Server with a duration of 600 ms.With this change, when I type a line of code with a length of 42 characters in VS Code, we're sending 8 requests to the Analysis Server. Before, with just the VS Code debouncing, we were sending 12. (Note: We can further increase the debounce duration if necessary, FYI @bwilkerson)
Finally, I renamed the existing
DebounceTimerclass toPeriodicDebouncerto make clear the difference between that debouncer and the one I've added.