From: Tim Starling Date: Sun, 6 Jun 2004 14:23:04 +0000 (+0000) Subject: profiling bracket around main entry point X-Git-Tag: 1.5.0alpha1~3011 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=c20c05d91f0889bc55267c5309e1e06fed21520d;p=lhc%2Fweb%2Fwiklou.git profiling bracket around main entry point --- diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 4ba5b7713d..4b8bca41c3 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -18,7 +18,9 @@ class DifferenceEngine { function showDiffPage() { global $wgUser, $wgTitle, $wgOut, $wgLang; - + $fname = "DifferenceEngine::showDiffPage"; + wfProfileIn( $fname ); + $t = $wgTitle->getPrefixedText() . " (Diff: {$this->mOldid}, " . "{$this->mNewid})"; $mtext = wfMsg( "missingarticle", $t ); @@ -27,6 +29,7 @@ class DifferenceEngine { if ( ! $this->loadText() ) { $wgOut->setPagetitle( wfMsg( "errorpagetitle" ) ); $wgOut->addHTML( $mtext ); + wfProfileOut( $fname ); return; } $wgOut->suppressQuickbar(); @@ -44,6 +47,7 @@ class DifferenceEngine { if ( !( $this->mOldPage->userCanRead() && $this->mNewPage->userCanRead() ) ) { $wgOut->loginToUse(); $wgOut->output(); + wfProfileOut( $fname ); exit; } @@ -80,6 +84,8 @@ class DifferenceEngine { $oldHeader, $newHeader ); $wgOut->addHTML( "

{$this->mNewtitle}

\n" ); $wgOut->addWikiText( $this->mNewtext ); + + wfProfileOut( $fname ); } function showDiff( $otext, $ntext, $otitle, $ntitle )