Page MenuHomePhabricator

Determine if we can merge WikiPage::getContributors with RevisionStore::getAuthorsBetween
Open, MediumPublic

Description

Originally filed as:

The two methods do mostly the same thing, so one should use another. We can think about enhancing the API for RevisionStore::getAuthorsBetween to be able to exclude some users, not sure that's needed really.

But in code review, this came up:

Hm... This is something I haven't thought through... Before we were making a single query to the user table via a join, and now we're going to fetch all the real names one-by-one. This will probably have a severe performance impact.

Do we need to fix it - probably yes, for pages with large histories the new code will likely timeout. How to fix it - I'm not sure. Ideally we'd make user's real name a user option and have a method for bulk-loading user options. Alternatively, UserCache is capable of batch-fetching user names, but I wanted to deprecate this class.

Event Timeline

daniel triaged this task as Medium priority.Feb 11 2021, 11:48 AM
CCicalese_WMF renamed this task from Merge WikiPage::getContributors with RevisionStore::getAuthorsBetwee to Merge WikiPage::getContributors with RevisionStore::getAuthorsBetween.May 11 2021, 8:57 PM
CCicalese_WMF claimed this task.
CCicalese_WMF added a subscriber: Peter.ovchyn.

Change 691259 had a related patch set uploaded (by Cicalese; author: Cicalese):

[mediawiki/core@master] Merge WikiPage::getContributors with RevisionStore::getAuthorsBetween

https://gerrit.wikimedia.org/r/691259

daniel renamed this task from Merge WikiPage::getContributors with RevisionStore::getAuthorsBetween to Determine if we can merge WikiPage::getContributors with RevisionStore::getAuthorsBetween.Jun 8 2021, 12:06 PM
daniel updated the task description. (Show Details)

Change 691259 abandoned by Cicalese:

[mediawiki/core@master] Merge WikiPage::getContributors with RevisionStore::getAuthorsBetween

Reason:

Needs work. Will revisit at a later date.

https://gerrit.wikimedia.org/r/691259