r81892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81891‎ | r81892 | r81893 >
Date:16:04, 10 February 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
More wfProfileOut()ing
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/MessageCache.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -150,6 +150,8 @@
151151 URL=$url2
152152 CONTROL;
153153 echo( $control );
 154+
 155+ wfProfileOut( __METHOD__ );
154156 return;
155157 }
156158
@@ -614,16 +616,20 @@
615617 $this->mCacheHit = true;
616618 // Check if the diff should be hidden from this user
617619 if ( !$this->loadRevisionData() ) {
 620+ wfProfileOut( __METHOD__ );
618621 return false;
619622 } elseif ( $this->mOldRev && !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) {
 623+ wfProfileOut( __METHOD__ );
620624 return false;
621625 } elseif ( $this->mNewRev && !$this->mNewRev->userCan( Revision::DELETED_TEXT ) ) {
 626+ wfProfileOut( __METHOD__ );
622627 return false;
623628 }
624629 // Short-circuit
625630 if ( $this->mOldRev && $this->mNewRev
626631 && $this->mOldRev->getID() == $this->mNewRev->getID() )
627632 {
 633+ wfProfileOut( __METHOD__ );
628634 return '';
629635 }
630636 // Cacheable?
@@ -751,6 +757,7 @@
752758 wfProfileOut( __METHOD__ . "-shellexec" );
753759 unlink( $tempName1 );
754760 unlink( $tempName2 );
 761+ wfProfileOut( __METHOD__ );
755762 return $difftext;
756763 }
757764
@@ -759,7 +766,9 @@
760767 $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
761768 $diffs = new Diff( $ota, $nta );
762769 $formatter = new TableDiffFormatter();
763 - return $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) .
 770+ $difftext = $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) ) .
 771+ wfProfileOut( __METHOD__ );
 772+ return $difftext;
764773 $this->debug();
765774 }
766775
Index: trunk/phase3/includes/MessageCache.php
@@ -440,6 +440,7 @@
441441 wfProfileIn( __METHOD__ );
442442
443443 if ( $this->mDisable ) {
 444+ wfProfileOut( __METHOD__ );
444445 return;
445446 }
446447
Index: trunk/phase3/includes/EditPage.php
@@ -666,10 +666,10 @@
667667 // Custom edit intro for new sections
668668 $this->section === 'new' ? 'MediaWiki:addsection-editintro' : '' );
669669
670 - wfProfileOut( __METHOD__ );
671 -
672670 // Allow extensions to modify form data
673671 wfRunHooks( 'EditPage::importFormData', array( $this, $request ) );
 672+
 673+ wfProfileOut( __METHOD__ );
674674 }
675675
676676 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r819211.17wmf1: MFT r81729, r81890, r81891, r81892, r81893, r81894, r81896, r81897,...catrope22:42, 10 February 2011
r85148MFT: r80495, r80610, r80765, r81177, r81490, r81692, r81707, r81729, r81765, ...demon20:11, 1 April 2011

Comments

#Comment by Catrope (talk | contribs)   21:49, 10 February 2011
+		return $difftext;
 		$this->debug();

Dead code (not introduced in this rev).

#Comment by Platonides (talk | contribs)   22:49, 10 February 2011

I know. There are similar $this->debug(); calls after return above, too. Seem purposefully left for debug.

Status & tagging log