Last modified: 2014-02-07 20:54:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57754, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55754 - list=allcampaigns API can run slowly or timeout if data not cached
list=allcampaigns API can run slowly or timeout if data not cached
Status: RESOLVED DUPLICATE of bug 54465
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Yuvi Panda
commons.wikimedia.org/w/api.php?actio...
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 20:19 UTC by Brion Vibber
Modified: 2014-02-07 20:54 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2013-10-15 20:19:29 UTC
Currently the upload campaigns branch of the Android Commons app uses UploadWizard's list=allcampaigns API to periodically refresh the list of campaigns.

Unfortunately this can run really slowly on Commons, especially if the parsed titles/descriptions/etc aren't cached due to a software update, massive cache clear, or selection of a new language. The worst case is a timeout or outright HTTP 500 error.

A few possibilities:

* (probably easy) could aggressively limit the number of items returned when not cached, so you at least get a fast result with fewer items instead of a timeout. This allows clients to continue fetching to get the rest of the results as they are built.

* (a bit more work) could do more lightweight rendering -- at fetch time we really only need the title; we could fetch the description and other fields when we go to upload something. Separately caching/rendering 'just titles' and 'whole field sets' could allow the list to run *much* faster.

* (probably not feasible?) could pre-cache items in the JobQueue after their dependencies change?
Comment 1 Yuvi Panda 2013-10-16 05:58:04 UTC
For 1, I got a 500 even with 50, and limiting it to below 50 sounds terrible to me. Complete hack!

2 is the right thing to do, perhaps. We could do a 'titles and description only' rendering / cache cycle, yeah. prop=titles|description can also be the default. Much less things to parse, so should be faster. Will split the cache, but that should not be an issue, I think.

3 sounds terrible :P For all the languages?!
Comment 2 Nemo 2014-02-07 20:54:45 UTC
Can't see the difference to bug 54465 nor decide which of the two is more helpful, I'll just dupe.

*** This bug has been marked as a duplicate of bug 54465 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links