[Foundation-l] Wikitext isn't a programming language, but...
Claus Färber
gmane at faerber.muc.de
Fri Jan 19 17:03:00 UTC 2007
David Strauss <david at fourkitchens.com> schrieb/wrote:
> I'm certainly no expert for the MediaWiki parser, but you could take a
> microtime() from the start of parsing and periodically check time
> elapsed. With anything beyond the allotted parsing time, the template
> would return either nothing or a warning.
This way, complex templates would sometimes work (if the server load is
low) and sometimes not work (if the server load is high, causing longer
execution times).
Better use a counter instead of real time. If a script requires less
than, say, 100 "ticks", it will always work no matter how long a tick
currently is.
Claus
More information about the wikimedia-l
mailing list