On Fri, Jul 3, 2009 at 3:13 AM, Tim Starling<tstarling(a)wikimedia.org> wrote:
Loops are essential for readable code. There is no
allowing loops in conjunction with time limits, that we don't have
already with complex templates. In fact, time limits for complex
templates would be an improvement over the system of expansion limits
we have at the moment.
But time limits are inconsistent. Whether a template hits the limit
might depend on whether it happens to be running on an Apache with a
Pentium IV, an Opteron, a Xeon, . . .
Recursion can give a long running time even if the
depth is limited.
By calling the function multiple times from its own body, you can have
exponential time order in the recursion depth.
You can also have exponential time with loops.