Profiling errors. r92106 missed a wfProfileOut
authorPlatonides <platonides@users.mediawiki.org>
Tue, 19 Jul 2011 19:05:23 +0000 (19:05 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 19 Jul 2011 19:05:23 +0000 (19:05 +0000)
r92118 added a wfProfileIn but not all returns were covered. Also changed its spaces to tabs.

includes/diff/DifferenceEngine.php
includes/parser/Tidy.php

index ec46b2c..aeb9b48 100644 (file)
@@ -779,7 +779,7 @@ CONTROL;
        function generateDiffBody( $otext, $ntext ) {
                global $wgExternalDiffEngine, $wgContLang;
 
-        wfProfileIn( __METHOD__ );
+               wfProfileIn( __METHOD__ );
 
                $otext = str_replace( "\r\n", "\n", $otext );
                $ntext = str_replace( "\r\n", "\n", $ntext );
@@ -791,6 +791,7 @@ CONTROL;
                        # input text to be HTML-escaped already
                        $otext = htmlspecialchars ( $wgContLang->segmentForDiff( $otext ) );
                        $ntext = htmlspecialchars ( $wgContLang->segmentForDiff( $ntext ) );
+                       wfProfileOut( __METHOD__ );
                        return $wgContLang->unsegmentForDiff( wikidiff_do_diff( $otext, $ntext, 2 ) ) .
                        $this->debug( 'wikidiff1' );
                }
@@ -802,6 +803,7 @@ CONTROL;
                        $text = wikidiff2_do_diff( $otext, $ntext, 2 );
                        $text .= $this->debug( 'wikidiff2' );
                        wfProfileOut( 'wikidiff2_do_diff' );
+                       wfProfileOut( __METHOD__ );
                        return $text;
                }
                if ( $wgExternalDiffEngine != 'wikidiff3' && $wgExternalDiffEngine !== false ) {
index de99571..3a6d3e9 100644 (file)
@@ -217,6 +217,8 @@ class MWTidy {
                if ( !MWInit::classExists( 'tidy' ) ) {
                        wfWarn( "Unable to load internal tidy class." );
                        $retval = -1;
+                       
+                       wfProfileOut( __METHOD__ );
                        return null;
                }