r92552 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92551‎ | r92552 | r92553 >
Date:19:05, 19 July 2011
Author:platonides
Status:ok
Tags:
Comment:
Profiling errors. r92106 missed a wfProfileOut
r92118 added a wfProfileIn but not all returns were covered. Also changed its spaces to tabs.
Modified paths:
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/includes/parser/Tidy.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -779,7 +779,7 @@
780780 function generateDiffBody( $otext, $ntext ) {
781781 global $wgExternalDiffEngine, $wgContLang;
782782
783 - wfProfileIn( __METHOD__ );
 783+ wfProfileIn( __METHOD__ );
784784
785785 $otext = str_replace( "\r\n", "\n", $otext );
786786 $ntext = str_replace( "\r\n", "\n", $ntext );
@@ -791,6 +791,7 @@
792792 # input text to be HTML-escaped already
793793 $otext = htmlspecialchars ( $wgContLang->segmentForDiff( $otext ) );
794794 $ntext = htmlspecialchars ( $wgContLang->segmentForDiff( $ntext ) );
 795+ wfProfileOut( __METHOD__ );
795796 return $wgContLang->unsegmentForDiff( wikidiff_do_diff( $otext, $ntext, 2 ) ) .
796797 $this->debug( 'wikidiff1' );
797798 }
@@ -802,6 +803,7 @@
803804 $text = wikidiff2_do_diff( $otext, $ntext, 2 );
804805 $text .= $this->debug( 'wikidiff2' );
805806 wfProfileOut( 'wikidiff2_do_diff' );
 807+ wfProfileOut( __METHOD__ );
806808 return $text;
807809 }
808810 if ( $wgExternalDiffEngine != 'wikidiff3' && $wgExternalDiffEngine !== false ) {
Index: trunk/phase3/includes/parser/Tidy.php
@@ -217,6 +217,8 @@
218218 if ( !MWInit::classExists( 'tidy' ) ) {
219219 wfWarn( "Unable to load internal tidy class." );
220220 $retval = -1;
 221+
 222+ wfProfileOut( __METHOD__ );
221223 return null;
222224 }
223225

Follow-up revisions

RevisionCommit summaryAuthorDate
r92586Merge code cleanup revisions so that code analysis can also be performed in t...platonides21:29, 19 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92106* Removed function_exists check in MWTidy, proc_open is on any PHP at out min...aaron22:10, 13 July 2011
r92118Fixed profiling erroraaron22:57, 13 July 2011

Status & tagging log