Page MenuHomePhabricator

Re-expose transclusions count in MediaWiki's info action (in miser mode)
Open, NormalPublic

Description

Re: https://gerrit.wikimedia.org/r/109710

We should find a way to re-expose this information. The current solution sucks because many wikis are inappropriately using miser mode (given its myriad other functions) and most templates don't have many transclusions (it's a long tail).

I believe we already set up caching for the info action's output. We could get more granular with the caching, if necessary.


Version: 1.23.0
Severity: normal
See Also:

Details

Reference
bz60740

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz60740.
bzimport added a subscriber: Unknown Object (MLST).
MZMcBride created this task.Feb 2 2014, 5:30 PM

Seems like the cache version for info action needs to be changed to clear the old info actions from cache, with shows this number actually.

Potential work around:
*estimate with EXPLAIN
*if estimate < 5000 do real query (5000 pulled out of my hat)
*otherwise round the estimate (since explain only rough order of magnitude, 512374 implies non existent precision), and output something like "roughly 510,000"

Possibly something similar should be done for other queries which could potentially scan millions of rows in an edge case.

Can I have a timeline on this? If it's going to take a while I'll reimplement my tool (which provides just this information) in Labs. Otherwise, I shan't bother.

My own personal view is that action=info could perhaps have two modes, where if the particular information you wanted wasn't available, you could request the performance intensive mode. But that's just an idea.

An alternative work around would be to use a subquery with a limit in it like mobile does

LIMIT 5000 would certainly be a useful placeholder until we work out a better fix.

demon removed a subscriber: demon.Dec 16 2014, 7:57 PM
MariaDB [enwiki_p]> select count(*) from templatelinks where tl_title = 'Infobox_SCOTUS_case' and tl_namespace = 10;
+----------+
| count(*) |
+----------+
|     3319 |
+----------+
1 row in set (0.01 sec)

I think we're already caching other "expensive" parts of the info action output. Perhaps we can just cache the transclusions count?

Peachey88 updated the task description. (Show Details)Jan 21 2019, 7:15 AM
Peachey88 removed a subscriber: wikibugs-l-list.