From cec4972e31ea3deaeea3ab0cfb207ef94c85b5a8 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 15 May 2011 12:40:32 +0000 Subject: [PATCH] Profile brace substitution per title to help detect the "bad templates". (Make this configurable?) --- includes/parser/Parser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1f780fb2da..4a66369a3d 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3044,7 +3044,8 @@ class Parser { # *** FIXME if piece['parts'] is null then the call to getLength() below won't work b/c this $args isn't an object $args = ( null == $piece['parts'] ) ? array() : $piece['parts']; wfProfileOut( __METHOD__.'-setup' ); - + wfProfileIn( __METHOD__."-title-$originalTitle" ); + # SUBST wfProfileIn( __METHOD__.'-modifiers' ); if ( !$found ) { @@ -3262,6 +3263,7 @@ class Parser { # Recover the source wikitext and return it if ( !$found ) { $text = $frame->virtualBracketedImplode( '{{', '|', '}}', $titleWithSpaces, $args ); + wfProfileOut( __METHOD__."-title-$originalTitle" ); wfProfileOut( __METHOD__ ); return array( 'object' => $text ); } @@ -3330,6 +3332,7 @@ class Parser { $ret = array( 'text' => $text ); } + wfProfileOut( __METHOD__."-title-$originalTitle" ); wfProfileOut( __METHOD__ ); return $ret; } -- 2.20.1