Page MenuHomePhabricator

Restore action=credits on Wikimedia wikis
Open, NormalPublic

Description

AFAIK disabled for performance reasons.

"Shows a list of people who contributed to the page in question using the real name specified in the user's preferences. Currently disabled on Wikimedia wikis, but is enabled by default on vanilla MediaWiki."
https://translatewiki.net/w/i.php?title=Translating:MediaWiki&action=credits


Version: unspecified
Severity: enhancement
See Also:

Details

Reference
bz47721

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:42 AM
bzimport set Reference to bz47721.
bzimport added a subscriber: Unknown Object (MLST).

Indeed disabled via:

$wgActions['credits'] = false;

hashar removed a subscriber: hashar.Jan 21 2015, 7:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 15 2015, 8:37 PM
Aklapper renamed this task from Restore action=credits on WMF wikis to Restore action=credits on Wikimedia wikis.Dec 15 2015, 10:38 PM
Reedy added a subscriber: Reedy.EditedDec 15 2015, 10:50 PM

https://github.com/wikimedia/mediawiki/blob/master/includes/page/WikiPage.php#L1000

I presume caching is needed, but not enough (example for Paris on enwiki)

mysql:wikiadmin@db1072 [enwiki]> EXPLAIN SELECT rev_user AS user_id,rev_user_text AS user_name,user_real_name,MAX(rev_timestamp) AS timestamp  FROM `revision` LEFT JOIN `user` ON ((rev_user = user_id))  WHERE rev_page = 22989 AND (rev_user_text != '110.171.37.207') AND ((rev_deleted & 4) = 0)  GROUP BY rev_user,rev_user_text ORDER BY timestamp DESC;
+------+-------------+----------+--------+-----------------------------------------------+----------------+---------+--------------------------+-------+----------------------------------------------+
| id   | select_type | table    | type   | possible_keys                                 | key            | key_len | ref                      | rows  | Extra                                        |
+------+-------------+----------+--------+-----------------------------------------------+----------------+---------+--------------------------+-------+----------------------------------------------+
|    1 | SIMPLE      | revision | ref    | rev_page_id,page_timestamp,usertext_timestamp | page_timestamp | 4       | const                    | 27090 | Using where; Using temporary; Using filesort |
|    1 | SIMPLE      | user     | eq_ref | PRIMARY                                       | PRIMARY        | 4       | enwiki.revision.rev_user |     1 |                                              |
+------+-------------+----------+--------+-----------------------------------------------+----------------+---------+--------------------------+-------+----------------------------------------------+
2 rows in set (0.09 sec)

mysql:wikiadmin@db1072 [enwiki]>
Elitre added a subscriber: Elitre.Feb 16 2016, 10:28 AM

So taking a quick look at this it looks like the expensive bit here is the getContributors method in CreditsAction which calls WikiPage::getContributors which will hit the db every time.

In theory this should be easy to cache in some way

ToBeFree added a subscriber: ToBeFree.