From: Tim Starling Date: Tue, 23 Sep 2014 03:54:34 +0000 (+1000) Subject: Profiling for Language::fetchLanguageNames X-Git-Tag: 1.31.0-rc.0~13844 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=f215a7216b8e531e81505656c09c18309d5d0cf5;p=lhc%2Fweb%2Fwiklou.git Profiling for Language::fetchLanguageNames It is 16% of an enwiki Main Page parser cache hit, under HHVM. Change-Id: Ifb2ce7592fa5b5cb9c7fb5af5949c43fecf18ca3 --- diff --git a/languages/Language.php b/languages/Language.php index 115a918ffc..c889417cf1 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -849,6 +849,8 @@ class Language { global $wgExtraLanguageNames; static $coreLanguageNames; + wfProfileIn( __METHOD__ ); + if ( $coreLanguageNames === null ) { global $IP; include "$IP/languages/Names.php"; @@ -876,6 +878,7 @@ class Language { } if ( $include === 'all' ) { + wfProfileOut( __METHOD__ ); return $names; } @@ -897,10 +900,12 @@ class Language { } } + wfProfileOut( __METHOD__ ); return $namesMwFile; } # 'mw' option; default if it's not one of the other two options (all/mwfile) + wfProfileOut( __METHOD__ ); return $returnMw; }