r47353 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47352‎ | r47353 | r47354 >
Date:03:26, 17 February 2009
Author:tstarling
Status:ok
Tags:
Comment:
Added some profiling sections for expensive functions
Modified paths:
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -800,6 +800,7 @@
801801 */
802802 function loadMessagesFile( $filename, $langcode = false ) {
803803 global $wgLang, $wgContLang;
 804+ wfProfileIn( __METHOD__ );
804805 $messages = $magicWords = false;
805806 require( $filename );
806807
@@ -822,6 +823,7 @@
823824 global $wgContLang;
824825 $wgContLang->addMagicWordsByLang( $magicWords );
825826 }
 827+ wfProfileOut( __METHOD__ );
826828 }
827829
828830 /**
@@ -831,6 +833,7 @@
832834 * @param string $langcode Language code to process.
833835 */
834836 function processMessagesArray( $messages, $langcode ) {
 837+ wfProfileIn( __METHOD__ );
835838 $fallbackCode = $langcode;
836839 $mergedMessages = array();
837840 do {
@@ -842,6 +845,7 @@
843846
844847 if ( !empty($mergedMessages) )
845848 $this->addMessages( $mergedMessages, $langcode );
 849+ wfProfileOut( __METHOD__ );
846850 }
847851
848852 public function figureMessage( $key ) {

Status & tagging log