From 7377d6c080cc224a1c78771cd694bb9dfd8b047d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 27 Oct 2011 21:53:37 +0000 Subject: [PATCH] Added pfunc profiling to braceSubstitution() --- includes/parser/Parser.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e281ff6698..f95a216b8c 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3132,6 +3132,7 @@ class Parser { } } if ( $function ) { + wfProfileIn( __METHOD__ . '-pfunc-' . $function ); list( $callback, $flags ) = $this->mFunctionHooks[$function]; $initialArgs = array( &$this ); $funcArgs = array( trim( substr( $part1, $colonPos + 1 ) ) ); @@ -3153,6 +3154,7 @@ class Parser { # Workaround for PHP bug 35229 and similar if ( !is_callable( $callback ) ) { + wfProfileOut( __METHOD__ . '-pfunc-' . $function ); wfProfileOut( __METHOD__ . '-pfunc' ); wfProfileOut( __METHOD__ ); throw new MWException( "Tag hook for $function is not callable\n" ); @@ -3178,6 +3180,7 @@ class Parser { $text = $this->preprocessToDom( $text, $preprocessFlags ); $isChildObj = true; } + wfProfileOut( __METHOD__ . '-pfunc-' . $function ); } } wfProfileOut( __METHOD__ . '-pfunc' ); -- 2.20.1