Page MenuHomePhabricator

Add method(s) to preload the edit count for multiple users
Closed, ResolvedPublic2 Estimated Story Points

Description

  • During the code review of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1224698, it was raised that retrieving the edit count for each user in a page with lots of them (such as a contributions list) is not efficient.
  • We should be able to prefill an in-memory cache with the edit count for each user in a given listing, so that we don't issue a separate query for each

Acceptance criteria

  • A method in either the UserLinkRenderer or the UserEditTracker exists to populate a cache of edit counts

Event Timeline

hector.arroyo changed the task status from Open to In Progress.Mon, Jan 19, 12:14 PM
hector.arroyo updated the task description. (Show Details)
hector.arroyo updated the task description. (Show Details)
hector.arroyo set the point value for this task to 2.

Change #1228532 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/core@master] UserEditTracker: Add a method to preload the edit count cache explicitly

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

Changes to preload the edit count in the ContributionsPager have been rolled back: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1228532/20..24

hector.arroyo closed this task as Resolved.EditedWed, Jan 28, 1:47 PM

The change associated with this task is being merged now. Given this is a new internal functionality not changing any user-facing behavior, I think this can skip QA.

Change #1228532 merged by jenkins-bot:

[mediawiki/core@master] UserEditTracker: Add a method to preload the edit count cache explicitly

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