The current localisation system has a number of undesirable properties:
* Start from a cold cache is extremely slow, taking from 20 seconds to several minutes. * The database is preloaded with hundreds of default messages, causing: * Slow installation, to the point where web installation is entirely impossible on some resource-limited shared web hosts without commenting out the message cache section * Excessive disk usage and slow backups on sites with large numbers of near-empty wikis * The message cache can exceed the 1MB limit of MemCached, causing total failure * The performance of the message cache degrades when some of the keys are large
I spent a fair bit of time pondering how to fix this, but I think it was Rotem who finally suggested the obvious solution: don't have pages for default messages.
The only reason for preloading the MediaWiki namespace was to provide admnis with model text upon which they could base their translations. This justification has long since disappeared, since action=edit, action=view and Special:Allmessages are now all capable of drawing default message text from the message files if the articles do not exist.
So here's what I've done in my working copy, soon to be committed: * Removed InitialiseMessages.inc and rebuildMessages.php * During upgrade, delete all pages in the MediaWiki namespace which were last modified by "MediaWiki default". * Reoptimised the message cache for the sparse MediaWiki namespace.
The main message cache (i.e. the $wgDBname:messages key) will now be a faithful representation of the contents of the MediaWiki namespace, instead of (as it previously was) a representation of the contents of all messages. If a page does not exist, it will not have a message cache key.
To solve the performance problems of having a small number of large items, any page which is larger than some threshold (10KB by default) will only have a placeholder stored in the main message cache, instead of the complete page text. The full contents of these items are stored separately in the cache.
-- Tim Starling