Profile brace substitution per title to help detect the "bad templates". (Make this...
authorPlatonides <platonides@users.mediawiki.org>
Sun, 15 May 2011 12:40:32 +0000 (12:40 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 15 May 2011 12:40:32 +0000 (12:40 +0000)
includes/parser/Parser.php

index 1f780fb..4a66369 100644 (file)
@@ -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;
        }