Don't await plugin deployment in backend process #13134
Merged
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
initialize
method inPluginDeployerContribution
sync to continue with backend loading while plugins are deployedresolvePlugins
&deployPlugins
& inPluginDeployerImpl
HostedPluginSupport
by only logging relevant measurements ofsync
/load
andstart
plugins (i.e. if the plugin count is 0 just stop the measurement but don`t log)I18nPreloadContribution
to 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
PluginDeployerImpl
to simulate a longer plugin deploy process:On the current master the backend process will block and not start the frontend loading until the
pluginDeployer
is 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