From: Tim Starling Date: Wed, 5 Jul 2006 07:20:11 +0000 (+0000) Subject: profiling X-Git-Tag: 1.31.0-rc.0~56400 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=643396ce0a02f6e59ba76cf6b8e38d51a680624e;p=lhc%2Fweb%2Fwiklou.git profiling --- diff --git a/includes/Image.php b/includes/Image.php index 6d5625bf8c..e5b12166ce 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -889,6 +889,7 @@ class Image * @public */ function getThumbnail( $width, $height=-1, $render = true ) { + wfProfileIn( __METHOD__ ); if ($this->canRender()) { if ( $height > 0 ) { $this->load(); @@ -897,7 +898,7 @@ class Image } } if ( $render ) { - return $this->renderThumb( $width ); + $thumb = $this->renderThumb( $width ); } else { // Don't render, just return the URL if ( $this->validateThumbParams( $width, $height ) ) { @@ -906,15 +907,17 @@ class Image } else { list( $isScriptUrl, $url ) = $this->thumbUrl( $width ); } - return new ThumbnailImage( $url, $width, $height ); + $thumb = new ThumbnailImage( $url, $width, $height ); } else { - return null; + $thumb = null; } } } else { // not a bitmap or renderable image, don't try. - return $this->iconThumb(); + $thumb = $this->iconThumb(); } + wfProfileOut( __METHOD__ ); + return $thumb; } /** @@ -1004,6 +1007,7 @@ class Image $height = -1; if ( !$this->validateThumbParams( $width, $height ) ) { # Validation error + wfProfileOut( __METHOD__ ); return null; }