Reduce JS loaded on critical path

As a precursor to incorporating a new language switcher in the new
version of Vector I'd like to improve the performance of loading
the switcher.

It seems most code can be deferred until the language selector
button is clicked.

This shaves around 30kb of resources off the critical path for
most users. There's potential here for a positive performance
impact so we should follow up the deployment by checking the
associated performance graphs to see if there's improvement.

Note, if the compact personal links feature is enabled
there is no performance saving for now. This will be addressed in follow
ups.

Bug: T153844
Bug: T153845
Bug: T237061
Change-Id: I740600d18859422b2f98a5ef92d0321f6e9615a2
This commit is contained in:
jdlrobson
2020-10-02 16:33:54 -07:00
committed by jenkins-bot
parent 8d5d63b996
commit 5cd10ce862
6 changed files with 53 additions and 28 deletions

View File

@@ -32,7 +32,6 @@
mw.uls = mw.uls || {};
mw.uls.previousLanguagesStorageKey = 'uls-previous-languages';
mw.uls.languageSettingsModules = [ 'ext.uls.displaysettings' ];
/**
* Change the language of wiki using API or set cookie and reload the page