[Foundation-l] Wikitext isn't a programming language, but...
David Strauss
david at fourkitchens.com
Fri Jan 19 09:27:58 UTC 2007
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.
David Gerard wrote:
> On 19/01/07, David Strauss <david at fourkitchens.com> wrote:
>
>> #loop is a problem. If this template language is Turing-complete, it can
>> be used to run infinitely long programs. That is a huge avenue for abuse.
>> Then again, there could be an execution limit to the parsing of a template.
>
>
> We have one real-life example of this, of course, in the recent
> template on es: Wikipedia that took 20 seconds to run and caused some
> annoyance on wikitech-l ... how feasible are execution time limits in
> practice, what's a reasonable limit (knowing people are going to push
> as close to it as they can) and what's a reasonable failure mode
> (knowing people are going to push as close to it as they can)?
>
>
> - d.
>
> _______________________________________________
> foundation-l mailing list
> foundation-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/foundation-l
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wikimedia.org/pipermail/wikimedia-l/attachments/20070119/87d39b4f/attachment-0001.pgp>
More information about the wikimedia-l
mailing list