From 34bfd1dd6a85fe46a630c9e824e613970c555728 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 10 Feb 2011 16:44:57 +0000 Subject: [PATCH] Add profiling to the whole ResourceLoader::makeModuleResponse --- includes/resourceloader/ResourceLoader.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 */ -- 2.20.1