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

       Web browser: ---
            Bug ID: 43888
           Summary: Batch API requests
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JS/token-stream transforms
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

We should amortize per-request overheads by batching API requests.

AFAIK there is no generic batching support in the API currently, and adding it
would probably be a bit too time-consuming for now. Instead we can add a unique
string as a separator, for example something like 

<nowiki>d41d8cd98f00b204e9800998ecf8427e</nowiki>

This would work for for action=expandtemplates and action=parse which are the
main workarounds we currently use. In the longer term we should switch to
explicit methods that don't involve parsing wikitext, which is probably also a
good moment to add real batching support.

Decisions about batch sizes could be based on wikitext source size initially
(based on the assumption that templates with a bazillion parameters also take
longer to expand). A fixed number of templates per batch would be another
simple alternative. Really fancy batching could use stats of previous
processing times (returned by the PHP preprocessor per transclusion and stored
in HTML).

Ideally we would also enforce separation between batched requests to avoid
non-deterministic behavior for stateful extensions.

-- 
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