From: Timo Tijhof Date: Thu, 11 Aug 2016 01:39:30 +0000 (-0700) Subject: resourceloader: Make cache-eval in mw.loader.work asynchronous X-Git-Tag: 1.31.0-rc.0~5348^2~1 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=482ad8d9fb2e8273cefc4a5a557604b093944c8b;p=lhc%2Fweb%2Fwiklou.git resourceloader: Make cache-eval in mw.loader.work asynchronous * Add 'if !batch.length' in work() to avoid needless initialisation of mw.loader.store(). work() can be called without anything in the batch because using() will call enqueue() for any non-ready modules in order to get a job callback. This will invoke work() as side-effect but will have no work to do. This was previously here but got moved in 488c5d9. * Add 'if !implementations.length' to avoid needless scheduling of an idle callback when none of the modules in the batch are found in local storage (e.g. first view). Bug: T142129 Change-Id: Icd39423aec35f25162d2443b1f0507f6f0c748a3 --- diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index 7ceb5fe9ee..122f232736 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -1195,7 +1195,7 @@ // Force jQuery behaviour to be for crossDomain. Otherwise jQuery would use // XHR for a same domain request instead of