I'm trying to port a template from wikitext to lua. The template [1] is quite simple, but it gets repeated hundreds of times in some pages. Getting the logic to work was not complicated (the modified version is at [2]), but I'm seeing huge performance variation in the lua version: parsing [3] takes anywhere from 15 to 20s, while the wikitext version is stable between 18.5 and 19s (I'm testing using the "preview in page" option).
Is this something to be expected from the lua interpreter? How can I minimize the problem?
Thanks, Strainu
[1] https://ro.wikipedia.org/wiki/Format:ElementLMI [2] https://ro.wikipedia.org/wiki/Utilizator:Strainu/testlmi [3] https://ro.wikipedia.org/wiki/Lista_monumentelor_istorice_din_Bucure%C8%99ti...
When I tried it just now, I didn't see such variation in the Lua version. The wikitext version was actually giving me more variation.
On Mon, Oct 7, 2013 at 12:44 PM, Strainu strainu10@gmail.com wrote:
I'm trying to port a template from wikitext to lua. The template [1] is quite simple, but it gets repeated hundreds of times in some pages. Getting the logic to work was not complicated (the modified version is at [2]), but I'm seeing huge performance variation in the lua version: parsing [3] takes anywhere from 15 to 20s, while the wikitext version is stable between 18.5 and 19s (I'm testing using the "preview in page" option).
Is this something to be expected from the lua interpreter? How can I minimize the problem?
Thanks, Strainu
[1] https://ro.wikipedia.org/wiki/Format:ElementLMI [2] https://ro.wikipedia.org/wiki/Utilizator:Strainu/testlmi [3] https://ro.wikipedia.org/wiki/Lista_monumentelor_istorice_din_Bucure%C8%99ti...
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org