Last modified: 2013-04-22 16:16:15 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 T41490, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39490 - Add caching to info action
Add caching to info action
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Tyler Romeo
:
Depends on:
Blocks: 38450 38451
  Show dependency treegraph
 
Reported: 2012-08-19 20:37 UTC by Sam Reed (reedy)
Modified: 2013-04-22 16:16 UTC (History)
4 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-08-19 20:37:34 UTC
Although roughly the queries look fine, it'd probably be worth adding some caching to it...
Comment 1 Tyler Romeo 2012-10-08 03:54:31 UTC
https://gerrit.wikimedia.org/r/27133
Comment 2 Tyler Romeo 2012-10-25 14:52:15 UTC
So I'm not sure how to go about the whole unwatched pages caching issue. Maybe just cache the database queries rather than the actual rendered list? If anybody has any suggestions that'd be great.
Comment 3 Alex Monk 2012-10-25 16:57:22 UTC
I would suggest caching it but only showing it if the user fits the criteria.
Comment 4 Tyler Romeo 2012-10-26 02:31:55 UTC
I agree, but the problem is that by the time the data is retrieved from the database and is processed, it's in a numerically indexed array. So what I'm saying is that there are two options: 1) Go through linearly and remove the information when we find it; or 2) instead of caching the actual processed array (which includes messages and whatnot), only cache the database queries. The problem with both solutions is that they're cause inefficiency.
Comment 5 Madman 2012-10-26 04:16:24 UTC
The latter is what I'd do, caching the results of pageCounts rather than pageInfo, containing the (very relatively) expensive queries Reedy was talking about in opening this bug.
Comment 6 Tyler Romeo 2012-10-26 04:29:12 UTC
Mhm, that's what I am thinking as well. I should be able to make a patch for this relatively easily.
Comment 7 MZMcBride 2012-10-26 13:57:42 UTC
The info action will ultimately include information such as number of transclusions or number of file uses. My concern is that updates (such as a new transclusion) won't propagate to these cached counts and users will end up seeing bad data.
Comment 8 Sam Reed (reedy) 2012-10-26 18:26:10 UTC
(In reply to comment #7)
> The info action will ultimately include information such as number of
> transclusions or number of file uses. My concern is that updates (such as a new
> transclusion) won't propagate to these cached counts and users will end up
> seeing bad data.

Which is the same as most cached data in MediaWiki...
Comment 9 Tyler Romeo 2012-10-26 19:33:15 UTC
True, but in that case, in the patch that introduces that information to the page, just put something that invalidates the InfoAction cache for every time a new templatelink is added.
Comment 10 Alex Monk 2012-12-22 13:57:47 UTC
(In reply to comment #1)
> https://gerrit.wikimedia.org/r/27133

Approved by Chris on the 18th.

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


Navigation
Links