Rewrote LanguageConverter::autoConvert() to make it use preg_match() with an offset...
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 21 Feb 2011 14:17:50 +0000 (14:17 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 21 Feb 2011 14:17:50 +0000 (14:17 +0000)
commit465e50e8e7b81a238dfee2d1c8daf82ba12b76b1
tree9b0c2d31185454703fbcf97cef1d361e77f51249
parent055c4cc4d04f5f75808f4516365163a30e9cafc8
Rewrote LanguageConverter::autoConvert() to make it use preg_match() with an offset instead of preg_split(). Reduces memory usage for my test case ([[台灣演員列表]]) to a negligible amount. This should eliminate the most common cause of OOMs on Wikimedia. Produces the exact same output for that test case for the zh -> zh-tw, parser tests pass, seems to work.
languages/LanguageConverter.php