More wfProfileOut()ing
authorPlatonides <platonides@users.mediawiki.org>
Thu, 10 Feb 2011 16:04:19 +0000 (16:04 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 10 Feb 2011 16:04:19 +0000 (16:04 +0000)
includes/EditPage.php
includes/MessageCache.php
includes/diff/DifferenceEngine.php

index 0aeb6a5..5f823dc 100644 (file)
@@ -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__ );
        }
 
        /**
index ed5778d..0650f1f 100644 (file)
@@ -440,6 +440,7 @@ class MessageCache {
                wfProfileIn( __METHOD__ );
 
                if ( $this->mDisable ) {
+                       wfProfileOut( __METHOD__ );
                        return;
                }
 
index 7da4983..7ebc8fe 100644 (file)
@@ -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();
        }