Micro optimization when fetching a magic from cache
authorAntoine Musso <hashar@free.fr>
Wed, 29 May 2013 10:21:42 +0000 (12:21 +0200)
committerNikerabbit <niklas.laxstrom@gmail.com>
Thu, 30 May 2013 15:42:34 +0000 (15:42 +0000)
commit780ec298da17e2ec052bc40541bad822b62498f4
tree338ee3077cedf819661c8b37feda2066749e5e83
parent32c371954ff96d98e859f4ce76ee91352165be82
Micro optimization when fetching a magic from cache

The Language::getMagic() methods would request a full copy of the magic
words array from the cache.  Instead use LocalisationCache::getSubitem()
to only fetch the magic word we are interested in.

I do not think that makes that much of a difference, but that is
certainly nicer.  Note that getSubItem() returns null on miss instead of
the previous 'false', that still works for the !is_array().

Change-Id: I02824fd313eeecb5e5b26cb79d7b5549f6648f91
languages/Language.php