From 2e3f7a97fdefb6c514fb1c9f170763e027f33de5 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 19 Jul 2011 19:05:23 +0000 Subject: [PATCH] Profiling errors. r92106 missed a wfProfileOut r92118 added a wfProfileIn but not all returns were covered. Also changed its spaces to tabs. --- includes/diff/DifferenceEngine.php | 4 +++- includes/parser/Tidy.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index ec46b2c7b8..aeb9b485d9 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -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 ) { diff --git a/includes/parser/Tidy.php b/includes/parser/Tidy.php index de99571305..3a6d3e9ca8 100644 --- a/includes/parser/Tidy.php +++ b/includes/parser/Tidy.php @@ -217,6 +217,8 @@ class MWTidy { if ( !MWInit::classExists( 'tidy' ) ) { wfWarn( "Unable to load internal tidy class." ); $retval = -1; + + wfProfileOut( __METHOD__ ); return null; } -- 2.20.1