wiki.techinc.nl/includes/resourceloader
Ori Livneh 1c17347580 Optimize how user options are delivered to the client
We currently embed the full set of user options in a <script> tag in the HTML
output of every page. This is grossly inefficient, because the full set of
options is usually largely made up of site defaults which the user hasn't
customized.

So instead of doing that, let's emit the default options using one
ResourceLoader module and then apply the user's customizations on top.

This has the effect of slightly increasing the total bytes of JavaScript code
(because options that the user has customized will be emitted twice: once with
their default value in the user.defaults module, and then again with the
customized value in user.options). But this is more than offset by the
fact that the bulk of user options code (~4 kB uncompressed on enwiki) becomes
cacheable across requests.

Bonus round:
* Varnish gets to cache 4 kB fewer per page.
* Changes to the default options don't take 30 days to propagate.

Change-Id: I5a7e258d2d69159381bf5cc363227088b8fd6019
2014-12-05 19:36:45 +00:00
..
DerivativeResourceLoaderContext.php resourceloader: Add ResourceLoaderContext::getUserObj and replace use of $wgUser 2014-10-23 14:09:30 -07:00
ResourceLoader.php Adding check for lessphp compiler to getLessCompiler() 2014-12-01 14:12:50 -08:00
ResourceLoaderContext.php resourceloader: Add ResourceLoaderContext::getUserObj and replace use of $wgUser 2014-10-23 14:09:30 -07:00
ResourceLoaderEditToolbarModule.php ResourceLoaderEditToolbarModule: Fix PHP Strict Standards warning 2014-09-16 16:46:19 +02:00
ResourceLoaderFileModule.php Fixed spacing 2014-10-30 17:50:19 +01:00
ResourceLoaderFilePageModule.php Fixed some @params documentation (includes/*) 2014-04-20 23:33:05 +02:00
ResourceLoaderFilePath.php resourceloader: Allow skins to provide additional styles for any module 2014-07-29 00:53:41 +02:00
ResourceLoaderLanguageDataModule.php mediawiki.language: Expose language fallback chain 2014-08-22 03:14:04 +02:00
ResourceLoaderLanguageNamesModule.php Cleanup some docs (includes/[m-r]) 2014-07-24 19:43:25 +02:00
ResourceLoaderModule.php resourceloader: Add support for delivering templates 2014-10-29 19:31:16 +00:00
ResourceLoaderNoscriptModule.php Fixed some @params documentation (includes/*) 2014-04-20 23:33:05 +02:00
ResourceLoaderSiteModule.php Revert "Set site logo url in ResourceLoaderSiteModule instead of inline styles" 2014-09-25 21:17:54 +00:00
ResourceLoaderSkinModule.php Set site logo in mediawiki.skinning.interface module instead of inline styles 2014-09-26 21:09:22 +00:00
ResourceLoaderStartUpModule.php Avoid extra-long code lines 2014-10-04 16:25:50 +00:00
ResourceLoaderUserCSSPrefsModule.php ResourceLoaderUserCSSPrefsModule: Remove unused dependency on mediawiki.user 2014-12-05 17:43:28 +00:00
ResourceLoaderUserDefaultsModule.php Optimize how user options are delivered to the client 2014-12-05 19:36:45 +00:00
ResourceLoaderUserGroupsModule.php resourceloader: Add ResourceLoaderContext::getUserObj and replace use of $wgUser 2014-10-23 14:09:30 -07:00
ResourceLoaderUserModule.php includes/resourceloader/: Use Config instead of globals 2014-08-07 18:47:34 +01:00
ResourceLoaderUserOptionsModule.php Optimize how user options are delivered to the client 2014-12-05 19:36:45 +00:00
ResourceLoaderUserTokensModule.php Revert "mediawiki.api: Use action=query&meta=tokens instead of action=tokens" 2014-11-25 07:22:32 +00:00
ResourceLoaderWikiModule.php resourceloader: Document that WikiModule::getDB() may return IDatabase 2014-11-03 18:13:56 +00:00