I'd like to know something more about template parsing/caching for
performance issues.

My question is: when a template is called, it's wikicode, I suppose, is
parsed and translated into "something running" - I can't imagine what
precisely, but I don't care so much about (so far :-) ). If a second call
comes to the server for the same template, but with different parameters,
the template is parsed again from scratch or something from previous parsing
is used again, so saving a little bit of server load?

If the reply is "yes", t.i. if the "running code" of the whole template is
somehow saved and cached, ready to be used again with new parameters,
perhaps it could be a good idea to build templates as "librares of different
templates", using the name of the template as a "library name" and a
parameter as the name of "specific function"; a simple #switch could be used
to use the appropriate code of that "specific function".

On the contrary, if nothing is saved, there would be good reasons to keep
the template code as simple as possible, and this idea of "libraries" would
be a bad one.

Alex
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to