From 57e0786ec3ce596902e8ad48071f171400ece760 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 10 Feb 2011 16:04:19 +0000 Subject: [PATCH] More wfProfileOut()ing --- includes/EditPage.php | 4 ++-- includes/MessageCache.php | 1 + includes/diff/DifferenceEngine.php | 11 ++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 0aeb6a56b5..5f823dcdce 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -666,10 +666,10 @@ class EditPage { // Custom edit intro for new sections $this->section === 'new' ? 'MediaWiki:addsection-editintro' : '' ); - wfProfileOut( __METHOD__ ); - // Allow extensions to modify form data wfRunHooks( 'EditPage::importFormData', array( $this, $request ) ); + + wfProfileOut( __METHOD__ ); } /** diff --git a/includes/MessageCache.php b/includes/MessageCache.php index ed5778db9e..0650f1f29c 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -440,6 +440,7 @@ class MessageCache { wfProfileIn( __METHOD__ ); if ( $this->mDisable ) { + wfProfileOut( __METHOD__ ); return; } diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 7da49835de..7ebc8fe169 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -150,6 +150,8 @@ class DifferenceEngine { URL=$url2 CONTROL; echo( $control ); + + wfProfileOut( __METHOD__ ); return; } @@ -614,16 +616,20 @@ CONTROL; $this->mCacheHit = true; // Check if the diff should be hidden from this user if ( !$this->loadRevisionData() ) { + wfProfileOut( __METHOD__ ); return false; } elseif ( $this->mOldRev && !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) { + wfProfileOut( __METHOD__ ); return false; } elseif ( $this->mNewRev && !$this->mNewRev->userCan( Revision::DELETED_TEXT ) ) { + wfProfileOut( __METHOD__ ); return false; } // Short-circuit if ( $this->mOldRev && $this->mNewRev && $this->mOldRev->getID() == $this->mNewRev->getID() ) { + wfProfileOut( __METHOD__ ); return ''; } // Cacheable? @@ -751,6 +757,7 @@ CONTROL; wfProfileOut( __METHOD__ . "-shellexec" ); unlink( $tempName1 ); unlink( $tempName2 ); + wfProfileOut( __METHOD__ ); return $difftext; } @@ -759,7 +766,9 @@ CONTROL; $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) ); $diffs = new Diff( $ota, $nta ); $formatter = new TableDiffFormatter(); - return $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) . + $difftext = $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) . + wfProfileOut( __METHOD__ ); + return $difftext; $this->debug(); } -- 2.20.1