Skin::getLanguages() was consuming 4% of index.php CPU time. In local testing, it was called three times per page view. So: * Memoize it, analogous to the nonfunctional code in SkinVector. * Simplify ClassicInterwikiLookup by removing the option to pass a CDB file path. This was only ever supported by a WikimediaMaintenance script. In the unlikely event that someone is using this feature, they have the same motivation to switch to PHP as we did in T122362. * Increase the size of ClassicInterwikiLookup's MapCacheLRU from 100 to 1000. This helps greatly in the case when $wgInterwikiCache is false and more than 100 interwikis are requested and seems harmless otherwise. * Optimise Title::getNsText() by assuming that the canonical name of NS_MAIN is the empty string. * Rearrange Message::__construct() to avoid duplicate type checks. Change-Id: I736cb74efc267fd2473a3267471735238217251c |
||
|---|---|---|
| .. | ||
| ClassicInterwikiLookupTest.php | ||
| InterwikiTest.php | ||