From: Platonides Date: Thu, 10 Feb 2011 16:44:57 +0000 (+0000) Subject: Add profiling to the whole ResourceLoader::makeModuleResponse X-Git-Tag: 1.31.0-rc.0~32067 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=34bfd1dd6a85fe46a630c9e824e613970c555728;p=lhc%2Fweb%2Fwiklou.git Add profiling to the whole ResourceLoader::makeModuleResponse --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index a06f1fe877..3d09b26d7a 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -444,6 +444,7 @@ class ResourceLoader { return '/* No modules requested. Max made me put this here */'; } + wfProfileIn( __METHOD__ ); // Pre-fetch blobs if ( $context->shouldIncludeMessages() ) { try { @@ -524,15 +525,16 @@ class ResourceLoader { } } - if ( $context->getDebug() ) { - return $exceptions . $out; - } else { + if ( !$context->getDebug() ) { if ( $context->getOnly() === 'styles' ) { - return $exceptions . $this->filter( 'minify-css', $out ); + $out = $this->filter( 'minify-css', $out ); } else { - return $exceptions . $this->filter( 'minify-js', $out ); + $out = $this->filter( 'minify-js', $out ); } } + + wfProfileOut( __METHOD__ ); + return $exceptions . $out; } /* Static Methods */