From f215a7216b8e531e81505656c09c18309d5d0cf5 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 23 Sep 2014 13:54:34 +1000 Subject: [PATCH] Profiling for Language::fetchLanguageNames It is 16% of an enwiki Main Page parser cache hit, under HHVM. Change-Id: Ifb2ce7592fa5b5cb9c7fb5af5949c43fecf18ca3 --- languages/Language.php | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.20.1