r101070 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101069‎ | r101070 | r101071 >
Date:21:53, 27 October 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Added pfunc profiling to braceSubstitution()
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -3132,6 +3132,7 @@
31333133 }
31343134 }
31353135 if ( $function ) {
 3136+ wfProfileIn( __METHOD__ . '-pfunc-' . $function );
31363137 list( $callback, $flags ) = $this->mFunctionHooks[$function];
31373138 $initialArgs = array( &$this );
31383139 $funcArgs = array( trim( substr( $part1, $colonPos + 1 ) ) );
@@ -3153,6 +3154,7 @@
31543155
31553156 # Workaround for PHP bug 35229 and similar
31563157 if ( !is_callable( $callback ) ) {
 3158+ wfProfileOut( __METHOD__ . '-pfunc-' . $function );
31573159 wfProfileOut( __METHOD__ . '-pfunc' );
31583160 wfProfileOut( __METHOD__ );
31593161 throw new MWException( "Tag hook for $function is not callable\n" );
@@ -3178,6 +3180,7 @@
31793181 $text = $this->preprocessToDom( $text, $preprocessFlags );
31803182 $isChildObj = true;
31813183 }
 3184+ wfProfileOut( __METHOD__ . '-pfunc-' . $function );
31823185 }
31833186 }
31843187 wfProfileOut( __METHOD__ . '-pfunc' );

Comments

#Comment by Nikerabbit (talk | contribs)   07:31, 28 October 2011

Wow these methods are long.

Status & tagging log