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.
|mediawiki/extensions/CheckUser||master||+25 -25||Cache CompareService::getTotalEditsFromIp result in an array|
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).