Hallo,
The second most popular tempate in the Hebrew Wikipedia is one that inserts the rlm character[1]. It has an optional parameter. If it's used, it inserts the lrm character instead. The condition runs in every transclusion.
Running a condition every time seems to me like an unnecessary thing, especially that the parameter is (probably) not used most of the time. It could be avoided by replacing all the instances where that parameter is used by another template that simply inserts the lrm. But maybe it's not actually needed because MediaWiki's caching avoids the performance problem?
I'm not much of a performance person, so I'd like the experts' opinion.
Thanks.
[1] https://en.wikipedia.org/wiki/Right-to-left_mark
-- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com “We're living in pieces, I want to live in peace.” – T. Moore
MediaWiki caches the result of templates called with no parameters, but not if they are called with parameters, so there would be a small performance benefit to splitting the template. However, [1] also comes into play here, so unless it'd be just as convenient to have the second template, or you're sure there's problems with performance that you're hoping this would solve, I wouldn't bother.
[1] https://en.wikipedia.org/wiki/Wikipedia:Don%27t_worry_about_performance
On Sun, Dec 21, 2014 at 7:14 PM, Amir E. Aharoni < amir.aharoni@mail.huji.ac.il> wrote:
Hallo,
The second most popular tempate in the Hebrew Wikipedia is one that inserts the rlm character[1]. It has an optional parameter. If it's used, it inserts the lrm character instead. The condition runs in every transclusion.
Running a condition every time seems to me like an unnecessary thing, especially that the parameter is (probably) not used most of the time. It could be avoided by replacing all the instances where that parameter is used by another template that simply inserts the lrm. But maybe it's not actually needed because MediaWiki's caching avoids the performance problem?
I'm not much of a performance person, so I'd like the experts' opinion.
Thanks.
[1] https://en.wikipedia.org/wiki/Right-to-left_mark
-- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com “We're living in pieces, I want to live in peace.” – T. Moore _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org