In LanguageConverter:
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 19 Jan 2010 02:36:33 +0000 (02:36 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 19 Jan 2010 02:36:33 +0000 (02:36 +0000)
commit750b8f7c0417f0acd9645043e8f57cbf9719107d
treec46d0a9bb5055ce9323ef12e22bd8bcdba4a2c16
parentf144f4a35f58727e340e0e9b6b0f0f2da2f5950c
In LanguageConverter:
* Rewrote convertArray() as an RD parser (with inline tokenizer) as suggested on CR r60986. Fixes unclosed rule issue (with parser test). Fixes O(N^2) timing.
* Removed $this->mMarkup abstraction. Life is complicated enough as it is.
* Replaced a couple of instances of explode() with StringUtils::explode(), limited element count in a couple more.

In ConverterRule:
* Removed mConvTable initialisation from the constructor, unnecessary
* Optimised the "-{xxx}-" tight loop by replacing function calls such as count() and in_array() with language constructs such as isset(). Reduced execution time from 356us to 275us.
* Cached $varsep_pattern for further reduction to 243us.
* A couple more parseFlags() hacks brings it back to 230us.
* Split out $this->mVariantFlags from $this->mFlags. Rearranged flag detection into a foreach/switch to avoid unnecessary isset() calls. 189us.
* Added a special-case optimisation to generateConvTable() for the case where there are no tables defined inline in the article. 116us.
* Fixed bug from r37499: "!R || !N" is always true since they are mutually exclusive, "!R && !N" was intended (with parser test).
* Fixed E_NOTICE from "-{N|foo}-"
RELEASE-NOTES
languages/LanguageConverter.php
languages/classes/LanguageGan.php
languages/classes/LanguageKk.php
languages/classes/LanguageSr.php
languages/classes/LanguageZh.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc
maintenance/parserTests.txt