wiki.techinc.nl/includes/resourceloader
Timo Tijhof dec800968e resourceloader: Combine base modules and page modules requests
This commit implements step 4 and step 5 of the plan outlined at T192623.

Before this task began, the typical JavaScript execution flow was:

* HTML triggers request for startup module (js req 1).
* Startup module contains registry, site config, and triggers
  a request for the base modules (js req 2).
* After the base modules arrive (which define jQuery and mw.loader),
  the startup module invokes a callback that processes RLQ,
  which is what will request modules for this page (js req 3).

In past weeks, we have:

* Made mediawiki.js independent of jQuery.
* Spun off 'mediawiki.base' from mediawiki.js – for everything
  that wasn't needed for defining `mw.loader`.
* Moved mediawiki.js from the base module request to being embedded
  as part of startup.js.

The concept of dependencies is native to ResourceLoader, and thanks to the
use of closures in mw.loader.implement() responses, we can download any
number of interdependant modules in a single request (or parallel requests).
Then, when a response arrives, mw.loader takes care to pause or resume
execution as-needed. It is normal for ResourceLoader to batch several modules
together, including their dependencies.

As such, we can eliminate one of the two roundtrips required before a
page can request modules. Specifically, we can eliminate "js req 2" (above),
by making the two remaining base modules ("jquery" and "mediawiki.base") an
implied dependency for all other modules, which ResourceLoader will naturally
fetch and execute in the right order as part of the batch request.

Bug: T192623
Change-Id: I17cd13dffebd6ae476044d8d038dc3974a1fa176
2018-08-08 02:56:50 +00:00
..
DerivativeResourceLoaderContext.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoader.php resourceloader: Combine base modules and page modules requests 2018-08-08 02:56:50 +00:00
ResourceLoaderClientHtml.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderContext.php Replace call_user_func_array(), part 2 2018-06-07 20:19:26 -07:00
ResourceLoaderEditToolbarModule.php resourceloader: Consistently refer to the framework as ResourceLoader 2015-10-28 03:24:40 +00:00
ResourceLoaderFileModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderFilePath.php Remove self-explaining "section heading" comments from classes 2017-12-28 16:12:08 +01:00
ResourceLoaderForeignApiModule.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
ResourceLoaderImage.php ResourceLoaderImage module definitions can define a defaultColor 2018-06-27 20:36:47 +00:00
ResourceLoaderImageModule.php Merge "Allow ResourceLoaderImage modules without data URIs" 2018-07-09 14:24:36 +00:00
ResourceLoaderJqueryMsgModule.php Fix spacing for @param and indent of function comments 2017-08-15 14:33:29 +00:00
ResourceLoaderLanguageDataModule.php Revert "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code" 2018-07-23 17:27:23 +00:00
ResourceLoaderLanguageNamesModule.php mediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki.language.init' 2018-07-10 11:12:45 -07:00
ResourceLoaderLessVarFileModule.php ResourceLoaderLessVarFileModule: Add parameter 'lessMessages' 2018-05-12 17:46:15 +02:00
ResourceLoaderMediaWikiUtilModule.php Change @inheritdoc to @inheritDoc 2017-08-11 16:49:52 +02:00
ResourceLoaderModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderOOUIFileModule.php Restore the ability to set $wgResourceModuleSkinStyles for 'oojs-ui-core.styles' 2017-06-06 00:05:17 +02:00
ResourceLoaderOOUIImageModule.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ResourceLoaderOOUIModule.php Refactor registration of OOjs UI resource modules 2017-06-01 17:04:05 +02:00
ResourceLoaderSiteModule.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
ResourceLoaderSiteStylesModule.php resourceloader: Make 'site.styles' actually in group 'site' 2016-08-25 13:39:01 -07:00
ResourceLoaderSkinModule.php resourceloader: Improve coverage of SkinModule 2018-05-04 17:31:04 +01:00
ResourceLoaderSpecialCharacterDataModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderStartUpModule.php resourceloader: Combine base modules and page modules requests 2018-08-08 02:56:50 +00:00
ResourceLoaderUploadDialogModule.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
ResourceLoaderUserDefaultsModule.php Document return string as JavaScript code for getScript 2017-04-03 10:24:41 +02:00
ResourceLoaderUserModule.php resourceloader: Remove 'user.styles' dependency from 'user' module 2018-05-23 15:53:33 +01:00
ResourceLoaderUserOptionsModule.php Fix PhanTypeMismatchDeclaredParam 2018-07-07 00:34:30 +00:00
ResourceLoaderUserStylesModule.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoaderUserTokensModule.php resourceloader: Move FILTER_NOMIN annotation to the beginning of output 2018-01-30 19:12:34 +00:00
ResourceLoaderWikiModule.php Don't pass false as a wikiId to invalidateModuleCache() 2018-08-03 14:47:29 +02:00