https://bugzilla.wikimedia.org/show_bug.cgi?id=45684

       Web browser: ---
            Bug ID: 45684
           Summary: getExpandedArguments should not count toward the
                    10-second Lua execution limit
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Scribunto
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Per discussion at
http://en.wikipedia.org/wiki/Wikipedia:VPT#Lua_10-second_timeout_unusable_for_articles

If you transclude a Lua-powered template such as:

  {{bananas| <... complicated parserfunctions ...> }}

the input parameter is apparently not computed until the Module behind the
template accesses frame.args, which invokes
Scribunto_LuaSandboxCallback::getExpandedArgument. The time spent preprocessing
the parameters is thus counted against the 10-second time limit on Lua
execution.

This violates my expectations as an editor. In my simplistic mental model of
the parser, the template parameters are processed before any Lua code is
invoked. 

It has caused a problem on enwp, where {{hexadecimal}}, a simple
decimal-to-hexadecimal conversion template, has been converted to Lua. In
{{weather box}},  some complex parser functions are used, and the results are
passed into {{hexadecimal}}, dozens of times.  On pages with several weather
boxes, Lua timeouts result. On [[Climate of Russia]], for instance, 8s of Lua
time is spent in getExpandedArgument.

This could probably be fixed by converting {{weather box}} to Lua as well, but
there are many templates that need conversion, and it seems unwise to distort
editor priorities this way.

Per BJorsch in the linked VPT thread, "The counting of calls into PHP against
the time limit in general is intentional, but there is a good case for making
an exception for getExpandedArguments()."

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to