diff --git a/packages/core/src/browser/preload/i18n-preload-contribution.ts b/packages/core/src/browser/preload/i18n-preload-contribution.ts index 309c8df5f9436..0cddfa112e723 100644 --- a/packages/core/src/browser/preload/i18n-preload-contribution.ts +++ b/packages/core/src/browser/preload/i18n-preload-contribution.ts @@ -33,7 +33,7 @@ export class I18nPreloadContribution implements PreloadContribution { locale: defaultLocale }); } - if (nls.locale) { + if (nls.locale && nls.locale !== nls.defaultLocale) { const localization = await this.localizationServer.loadLocalization(nls.locale); if (localization.languagePack) { nls.localization = localization; diff --git a/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts b/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts index 13679f53bd200..51d3fe1c0b1c7 100644 --- a/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts +++ b/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts @@ -377,8 +377,12 @@ export class HostedPluginSupport { waitPluginsMeasurement.error('Backend deployment failed.'); } } - - syncPluginsMeasurement?.log(`Sync of ${this.getPluginCount(initialized)}`); + if (initialized > 0) { + // Only log sync measurement if there are were plugins to sync. + syncPluginsMeasurement?.log(`Sync of ${this.getPluginCount(initialized)}`); + } else { + syncPluginsMeasurement.stop(); + } } /** @@ -416,8 +420,12 @@ export class HostedPluginSupport { })); } } - - loadPluginsMeasurement.log(`Load contributions of ${this.getPluginCount(loaded)}`); + if (loaded > 0) { + // Only log load measurement if there are were plugins to load. + loadPluginsMeasurement?.log(`Load contributions of ${this.getPluginCount(loaded)}`); + } else { + loadPluginsMeasurement.stop(); + } return hostContributions; } @@ -488,7 +496,11 @@ export class HostedPluginSupport { return; } - startPluginsMeasurement.log(`Start of ${this.getPluginCount(started)}`); + if (started > 0) { + startPluginsMeasurement.log(`Start of ${this.getPluginCount(started)}`); + } else { + startPluginsMeasurement.stop(); + } } protected async obtainManager(host: string, hostContributions: PluginContributions[], toDisconnect: DisposableCollection): Promise { diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts b/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts index 053ce001bb9df..d5c9f38d7aab9 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts @@ -28,7 +28,7 @@ export class PluginDeployerContribution implements BackendApplicationContributio @inject(PluginDeployer) protected pluginDeployer: PluginDeployer; - initialize(): Promise { - return this.pluginDeployer.start(); + initialize(): void { + this.pluginDeployer.start().catch(error => this.logger.error('Initializing plugin deployer failed.', error)); } } diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts b/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts index 0fe63e7b5f24f..1eb032c397741 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts @@ -130,8 +130,9 @@ export class PluginDeployerImpl implements PluginDeployer { id, type: PluginType.System })); + const resolvePlugins = this.measure('resolvePlugins'); const plugins = await this.resolvePlugins([...unresolvedUserEntries, ...unresolvedSystemEntries]); - deployPlugins.log('Resolve plugins list'); + resolvePlugins.log('Resolve plugins list'); await this.deployPlugins(plugins); deployPlugins.log('Deploy plugins list'); }