Page MenuHomePhabricator

Call CompareService::getTotalEditsFromIp for each IP instead of each row
Closed, ResolvedPublic2 Estimated Story Points

Description

As discussed in T248588#6131426, this query need only be run once for each IP in compare check results. Instead it is currently being run once for each result row. Since rows can contain the same IP, that means it is being repeated unnecessarily.

Event Timeline

Niharika moved this task from Untriaged to Triage/To be Estimated on the Anti-Harassment board.
ARamirez_WMF set the point value for this task to 1.May 13 2020, 4:09 PM
ARamirez_WMF changed the point value for this task from 1 to 2.May 13 2020, 4:19 PM

Change 605395 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/CheckUser@master] Cache CompareService::getTotalEditsFromIp result in an array

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

Change 605395 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Cache CompareService::getTotalEditsFromIp result in an array

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

dom_walden subscribed.

I looked at the logs for a couple of different investigations.

Checked that for each IP in the Compare table there was one (and only one) call to getTotalEditsFromIp for that IP.

This true also when IPs have been filtered out (we don't make a call to getTotalEditsFromIp for filtered out IPs).

Test environment: vagrant MediaWiki 1.35.0-alpha (6c57976).