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

--- Comment #2 from Gabriel Wicke <[email protected]> ---
For us, the main use cases are template expansion using the PHP preprocessor
and the expansion of extension tags. Currently, both of these are only
available with a detour through the PHP parser (action=expandtemplates and
action=parse respectively), so we'd like to add direct API end points to
perform these actions.

A general batching mechanism would probably accept a posted JSON array with
each member being an object containing the API arguments for one action (action
etc). The return value would be a JSON array with results corresponding to the
request array. Instead of relying on positions in an array the client could
also supply UIDs for requests which are then mirrored in the result. This could
be achieved with an reqid member in each request object.

The problem with general batching is that state in MediaWiki is not very well
defined. Several extensions for example keep internal state between calls to
tag hooks, and resetting that state between individual requests in a batch
would probably produce a similar overhead as the regular per-request setup
(30+ms).

In Parsoid, we can work around this issue for our specific use cases by
maintaining a whitelist of stateless extensions which can be mixed in a batch
without producing non-deterministic output. Non-whitelisted extensions would
need to be expanded in a single action=parse request containing all extension
tags for that particular extension in page order.

-- 
You are receiving this mail because:
You are on the CC list 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