Hello, I am very new to the Wikimedia API, and have only just started
working with it.
I am writing code to access a Wikipedia page via the API, retrieve the text
with prop=extracts, retrieve wikitext via prop=revisions, and retrieve 7
links of some importance, for each of which I query the page image
(pageimages) and it's url (imageinfo),
I am preforming these requests sequentially in accordance with the
description given in the API docs.
I have found that requests, especially the first two for the raw text and
wikitext are taking much longer than expected to conclude. Retrieving plain
text takes around 700 milliseconds, and for wikitext around 800-900 millis.
Some of the problem is related to the response size probably, but querying
for image name and then url which both return a singe result also takes
around 600 milliseconds.
This means that my code is taking around 8-9 seconds to finish running and
that is quite too long. I will be uniting requests with multiple titles,
however I wanted to know if there is any other possible solution.
Show replies by date