Problem: the tool depends on databases that are updated on a monthly cadence. Between these updates, it uses the Mediawiki APIs to gather edit data since the last snapshot for any account that is queried -- e.g., if the snapshot was until April 30th and it's now May 15th, all edits made by the account between April 30th and May 15th would be gathered. For each of these new edits, the history of the edited page is also gathered to find overlapping accounts. For prolific editors / heavily-edited pages, this can result in a lot of API calls and cause timeouts. More context: T307023#7998668
Simplest fix: currently the tool caps the number of pages queried at 1000. This could be reduced down to e.g., 50, which would reduce the likelihood of timeouts. The missing data could be made transparent (the date range covered is already part of the API response) and subsequent calls would continue to update the databases until all the account's edits were incorporated. @Isaac will implement this and send to @Tchanders to coordinate testing / review.
Caveats:
- I don't know the right number of pages to cap this at but am going to try 50 and expect this to be reached relatively rarely -- i.e. to hit that cap, you'd need an editor who had edited 50 unique content pages in the past month and most suspected sockpuppets have fairly sparse activity in my observations. If we're seeing a lot of timeouts, we can always reduce further but I'm hesitant to go too low to start.
- We're making some assumptions too about the data that aren't perfect and the more sessions the edit data update is spread across, the more likely we are to introduce error into the data. I wouldn't be super concerned about this and I haven't empirically evaluated it but an FYI. Each monthly database update resets this error to 0 though, so that's good.
- A long term fix might also limit how much page history for each page is gathered but that's far more complicated so taking the simple route and monitoring for timeouts would be my preference before undergoing that work.