Page MenuHomePhabricator

Cache calls to Linker::userLink and Linker::userToolLinksRedContribs
Closed, ResolvedPublic

Description

Overview

When loading Special:CheckUser, a not insignificant time is taken up by calling these methods. Around 18% to 12% of the request time is taken up by these methods combined. Some performance gain may be found when caching the results of these methods, as these methods (should) produce the same result for a given user.

Placing the calls to these methods in ::preprocessResults would allow a similar method to how the revision comments are formatted for edits.

Acceptance criteria
  • The call to Linker::userLink should be cached per-user by CheckUserGetEditsPager
  • The call to Linker::userToolLinksRedContribs should be cached per-user by CheckUserGetEditsPager
  • Some performance increase should be seen due to the caching (otherwise, this should not be done).

Event Timeline

Change 977264 had a related patch set uploaded (by DatGuy; author: DatGuy):

[mediawiki/extensions/CheckUser@master] CheckUserPager: cache calls to Linker

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

Change 977264 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] CheckUserPager: cache calls to Linker

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

Dreamy_Jazz assigned this task to DatGuy.
Dreamy_Jazz added a subscriber: DatGuy.

Thanks @DatGuy for this patch. I'm closing this as resolved as the acceptance criteria have been completed.