Including the multimedia list, since the discussion is now broader. Gergo, Mark, I encourage you to read the backlog: https://lists.wikimedia.org/mailman/private/ops/2014-April/thread.html#31981
On Thu, Apr 17, 2014 at 4:31 PM, Brad Jorsch (Anomie) <bjorsch@wikimedia.org
wrote:
On Thu, Apr 17, 2014 at 4:13 AM, Gilles Dubuc gilles@wikimedia.orgwrote:
When the user opens media viewer, but there are 4 API calls per image
When I tried it just now, I saw 6 queries: one to prop=imageinfo to fetch a number of different props, one to meta=filerepoinfo, one to list=imageusage, one to prop=globalusage, and two more to prop=imageinfo to fetch the URLs for two different sizes of the image.
The first four could all be combined into one query (this is an advantage of the batch design of the web API over the much-touted REST model):
https://www.mediawiki.org/w/api.php?action=query&format=json&prop=im...
Being able to merge in the last two as well would be bug 54035.
Also, getting really offtopic here, "guprop[]=url&guprop[]=namespace" and "&iunamespace[]=0&iunamespace[]=100" that I see in your original queries doesn't actually work; it gives the same results as if guprop and iunamespace are omitted entirely. The API should give a warning about that (filed as bug 64057).
-- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation
Ops mailing list Ops@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/ops