Improve LanguageConverter performance on pages with many HTML tags
authorC. Scott Ananian <cscott@cscott.net>
Tue, 2 Jul 2019 18:02:33 +0000 (14:02 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Tue, 2 Jul 2019 18:24:45 +0000 (14:24 -0400)
commit930efa63e1db7634f69b3e798da80933ab42db4a
treef1ef8a1d361ad022ae3a3867deb1c050eb7036df
parentb74df863c8d0ab7873a4fd9453392ff4f7200b47
Improve LanguageConverter performance on pages with many HTML tags

We were concatenating a single character to the end of the wikitext
source (which copies the entire string) every time through an inner
loop; when the page was large and the loop count was large this took
an excessive amount of time.

Bug: T223969
Change-Id: Ib80306b0bc6c73b750d492764f0e2dfd3a7a5450
languages/LanguageConverter.php