Query Quick Access UI providers in a single UI-thread pass#4123
Open
vogella wants to merge 1 commit into
Open
Conversation
Contributor
QuickAccessContents computed proposals on a background job but, for every provider that requires UI access, scheduled a separate UIJob and blocked the worker on join(0). With roughly seven UI-access providers (editors, parts, perspectives, commands, actions, preferences, properties) that meant seven serialized worker-to-UI round-trips per keystroke, so the total time to populate the table scaled with UI-thread scheduling latency. Query all UI-access providers together in a single Display.syncExec and look the results up per provider when assembling the table. Non-UI providers still run directly on the worker. A per-provider try/catch keeps one failing provider from aborting the whole pass, matching the previous per-job isolation. Behavior and result ordering are unchanged; only the number of thread hops drops from one-per-provider to one.
4244263 to
ba04fc6
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 computes proposals on a background job, but for every provider that requires UI access it scheduled a separate UIJob and blocked the worker on
join(0). With around seven UI-access providers (editors, parts, perspectives, commands, actions, preferences, properties) that meant seven serialized worker-to-UI round-trips per keystroke, so the time to fill the table scaled with UI-thread scheduling latency.This queries all UI-access providers together in one UIJob and looks the results up per provider when assembling the table; non-UI providers still run directly on the worker. Result ordering and behavior are unchanged, only the number of thread hops drops from one-per-provider to one. This should also reduce the intermittent macOS timeout in QuickAccessDialogTest.testCommandEnableContext, where the repeated round-trips occasionally pushed the compute past the test's wait.