Last modified: 2014-09-02 11:32:23 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 T56465, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54465 - Campaigns API call is very, very slow
Campaigns API call is very, very slow
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Yuvi Panda
: performance
: 55754 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-23 11:51 UTC by Yuvi Panda
Modified: 2014-09-02 11:32 UTC (History)
7 users (show)

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


Attachments

Description Yuvi Panda 2013-09-23 11:51:32 UTC
Hitting https://commons.wikimedia.org/w/api.php/?action=query&list=allcampaigns takes me about 10s or so before it returns. Eeeek!
Comment 1 Yuvi Panda 2013-09-23 12:30:41 UTC
Did some more investigation, and looks like DB hits aren't part of the problem (apergos ran EXPLAIN on the produced queries on production DB).

Asking for all campaigns (~140 at this point) takes about 17s, 50 takes 7s, and 5 takes 0.7s. Seems to be sortof linear. Current suspicion is that all the wikitext parsing is what is causing the problem...
Comment 2 Brion Vibber 2013-09-23 22:35:08 UTC
Jotting down a quick note from IRC discussion:

Making sure the parsed output is cached, and invalidating via standard refreshlinks jobqueue etc may help...

I worry though that the multilanguage & translation support will make this tricky; after a large invalidation the worst-case rendering time for 140+ campaigns would still be really terrible.

A cheap hack to help might be to restrict the default paging limit on the API call, like some of the more expensive API calls do. This'd break up the worst-case rendering time into smaller individual requests which can return in decent time.

Another solution might be to use a cheaper bulk call that doesn't translate anything but the campaign names, then fetch the details on a subsequent request if you need them.
Comment 3 Fabrice Florin 2013-10-10 17:42:41 UTC
Yuvi, can you let us know if your latest patch has fixed this issue?
Comment 4 Yuvi Panda 2013-10-10 18:06:55 UTC
Should be, yeah. I can confirm once this rolls out to Commons on Monday. Testwiki perf testing makes the calls complete in about 200ms, while it was close to a second before. A similar reduction on commons would be great.
Comment 5 Mark Holmquist 2013-11-20 18:31:41 UTC
Yuvi, what's your status?
Comment 6 Andre Klapper 2013-12-18 14:43:07 UTC
Yuvi, what's your status?
Comment 7 Nemo 2014-02-07 20:54:45 UTC
*** Bug 55754 has been marked as a duplicate of this bug. ***
Comment 8 Kunal Mehta (Legoktm) 2014-02-07 22:11:37 UTC
Is Campaigns using pasercache? That seems like the easiest way to make it faster...
Comment 9 Kunal Mehta (Legoktm) 2014-02-07 22:11:48 UTC
parsercache*
Comment 10 Andre Klapper 2014-09-02 11:32:23 UTC
(In reply to Yuvi Panda from comment #4)
> I can confirm once this rolls out to Commons on Monday.

Yuvi? Also, still working on this (assignee field)?

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


Navigation
Links