Don't await plugin deployment in backend process#13134
Merged
tortmayr merged 1 commit intoeclipse-theia:masterfrom Dec 21, 2023
Merged
Don't await plugin deployment in backend process#13134tortmayr merged 1 commit intoeclipse-theia:masterfrom
tortmayr merged 1 commit intoeclipse-theia:masterfrom
Conversation
- Make `initialize` method in `PluginDeployerContribution` sync to continue with backend loading while plugins are deployed - Fix wrong performance measurements of `resolvePlugins` & `deployPlugins` & in `PluginDeployerImpl` - Improve performance logging in `HostedPluginSupport` by only logging relevent measurements of `sync/`load` and `start` plugins (i.e. if the plugin count is 0 just stop the measurement but don`t log) - Update `I18nPreloadContribution` to ensure that we only load the localizations from the backend if the current locale is not equal to the default locale
11 tasks
2 tasks
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.
What it does
initializemethod inPluginDeployerContributionsync to continue with backend loading while plugins are deployedresolvePlugins&deployPlugins& inPluginDeployerImplHostedPluginSupportby only logging relevant measurements ofsync/loadandstartplugins (i.e. if the plugin count is 0 just stop the measurement but don`t log)I18nPreloadContributionto ensure that we only load the localizations from the back end if the current locale is not equal to the default locale. This fixes an issue where we unnecessarily queried the localization server in the preload step if the locale is explicitly set to "en". (This happens for instance if you change the display language and then switch back to english).Contributed on behalf of ST Microelectronics
How to test
Everything should work as before. In the example apps the deploy plugin step does not take very long because most of the
default plugins are rather minimal and can deployed very fast.
To see a the real benefit you could add a timeout to the
PluginDeployerImplto simulate a longer plugin deploy process:On the current master the backend process will block and not start the frontend loading until the
pluginDeployeris finished.With this change the fronted is started and loaded right away. Once the plugins are deployed the frontend will be notified and
starts the plugins.
Follow-ups
Review checklist
Reminder for reviewers