Page MenuHomePhabricator

Improve load times for Special:CheckUser's 'Get edits' mode
Open, Needs TriagePublic

Description

When loading Special:CheckUser with the 'Get edits' mode and 5,000 results are being displayed, the request can take 30s+ to load. Running the Flame graph on a particularly bad request on mwdebug servers gives a request time of 44s.

As part of the Client Hints work, the time to respond in these situations will increase. Working on strategies to reduce the time it takes to load a request will help mitigate the increased time to load the request.

Discussing with CUs it seems that simply reducing the number of result shown by default is not acceptable. There have been calls to make this number bigger than 5,000 (even though you can now page the results).

Ideas:

  • Add a preference to allow users to decrease the default number of results shown per page (T318874)
  • Cache calls to CheckUserUtilityService::getClientIPfromXFF, so the method is only called once per XFF value
  • Cache calls to User::isHidden
  • Cache calls to Linker::userLink
  • Cache calls to Linker::userToolLinksRedContribs
  • Don't load revisions from the DB one-by-one for formatting of comments and checking visibility, instead either:
    • Load all the revisions from the DB at once
    • Make fake revision rows so that no DB queries need to be made.