Page MenuHomePhabricator

GlobalContributions: Bad performance when target has edited a high number of wikis
Closed, ResolvedPublic

Description

Summary

Special:GlobalContributions is very slow to render when looking up a target that has edited a high number of wikis.

Background

  • Special:GlobalContributions currently needs to determine the requesting user's permissions on every wiki the target ever edited to determine their permissions on each of those wikis and thus exclude wikis from querying where the requesting user doesn't have the requisite permissions.
  • In extreme cases such as https://performance.wikimedia.org/excimer/profile/71633bac6e551f3d, this can take almost half a minute to complete.

Technical notes

Acceptance criteria

  • GlobalContributions performs better even for targets that edited many wikis (TBD: define explicit upper bound for acceptable response time)

Event Timeline

It may potentially be worth noting that this can also sometimes occur when the target user hasn’t actually edited that many wikis — my GlobalContributions takes a looong time to load, even though (according to my CentralAuth) I’ve only actually ever made edits on 8 individual wikis.

Without having looked at the code, my guess is that this could potentially be related to having (relatively recently) run the Global SUL tool - and, therefore, that CheckUser might potentially have entries relating to account autocreations on a larger number of wikis. If my guess is correct (& thinking out loud), I wonder if there’s a way to prevent any permission-checking API calls from being made to wikis where no actual edits have taken place? (I apologize if my guess is incorrect and/or of no relevance!)

Change #1128435 had a related patch set uploaded (by Máté Szabó; author: Máté Szabó):

[mediawiki/extensions/CheckUser@master] GlobalContributions: Use higher concurrency for foreign wiki requests

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

I think I'm going to resolve this for now as looking at instrumentation we look like we've improved times from when we started:

image.png (600×1 px, 125 KB)

I think there were some concerns w/the concurrency patch ⬆ so it sounds like we'd prefer to maintain status quo if possible and as such, there area no more immediate actions planned for Special:GC performance improvements. We'll keep monitoring performance and if this recurs, we can re-open.

Change #1128435 abandoned by Dreamy Jazz:

[mediawiki/extensions/CheckUser@master] GlobalContributions: Use higher concurrency for foreign wiki requests

Reason:

Change is -2'd, written by a former employee, and attached to a since closed Phab task

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