wiki.techinc.nl/tests/phpunit/includes/resourceloader
Timo Tijhof 1367e356e7 resourceloader: Remove isFileModule() overhead from web requests
About 1.5% of load.php wall-time is spent in isFileModule() calls
during the ServiceWiring/getResourceLoader/register call early on.

Reduce the overhead of this cost by moving that logic to the Module
class.

There are two costs that we save this way:

1. The inherent cost of applying the skinStyles.

   This is now limited to only the modules that are constructed in a
   given web request. Thus, apart from the startup response (which
   constructs all modules), for regular load.php requests and all
   index.php page views, the vast majority of modules will never need
   to be constructed, and thus won't pay this cost.

2. The overhead of predicting (and class-loading) for whether a module
   is (or will become) a FileModule object.

   This is what isFileModule() does and is the main reason I wrote
   this patch. It involves class loading, and checks and conditions that
   run 1000+ times at WMF. This is eliminated now because we no longer
   have to calculate this decision. Instead, the logic applies when
   it needs to (due to FileModule implementing it), and doesn't
   when it doesn't!

Change-Id: Ia2db14f930800c96e767b94ef62fb00e9d52725b
2021-08-19 01:18:32 +00:00
..
templates
DerivativeResourceLoaderContextTest.php tests: Swap assertion order in unit tests 2021-08-04 20:21:01 +02:00
MessageBlobStoreTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
ResourceLoaderClientHtmlTest.php Merge "resourceloader: Add internal handling for debug=2" 2021-02-16 19:54:10 +00:00
ResourceLoaderContextTest.php resourceloader: Add internal handling for debug=2 2021-01-29 01:09:35 +00:00
ResourceLoaderFileModuleTest.php resourceloader: Add integration test for ResourceModuleSkinStyles 2021-08-19 01:14:00 +00:00
ResourceLoaderImageModuleTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
ResourceLoaderLessVarFileModuleTest.php resourceloader: Fail gracefully if a LESS message is not found 2021-01-07 15:41:02 -08:00
ResourceLoaderModuleTest.php resourceloader: Add missing Module->setConfig() calls in tests and installer 2021-06-13 21:20:58 +00:00
ResourceLoaderOOUIImageModuleTest.php Remove usages of Skin::getAllowedSkins. 2020-08-05 02:48:29 +01:00
ResourceLoaderSkinModuleTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
ResourceLoaderStartUpModuleTest.php resourceloader: Add missing Module->setConfig() calls in tests and installer 2021-06-13 21:20:58 +00:00
ResourceLoaderTest.php resourceloader: Remove isFileModule() overhead from web requests 2021-08-19 01:18:32 +00:00
ResourceLoaderWikiModuleTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00