Revise the new Xtools Edit Counter code to use same architecture and front-end as the other pieces that have been re-written (articleinfo and topedits).
|Resolved||Matthewrbowker||T153112 Epic: Rewriting XTools|
|Resolved||Samwilson||T160481 Rewrite Edit Counter with new backend architecture|
The edit counter has a table of "SUL editcounter" totals for the top 10 for the given user. This doesn't actually have anything to do with SUL does it? We just need to list the top 10 projects from the meta wiki table? Or does SUL give us some cool way of calculating this?
No, maybe SUL is probably a misnomer. "Top global contributions" or something similar is would be better, methinks. I'm not certain how it works, but my guess is you would get all the projects from the meta table then query for total contributions on each, which you might be able to do with a single query.
Cool, okay, so I've got the top-sites list working so far by just looping through all the sites in the meta table, finding the user's total revisions (separate queries), and sorting for the top ten. It caches the total count for 24 hours, but the first run is pretty slow. I'm not sure if there's a better place to get this data from, especially considering that we want this to work for third-party wikis.
This is done, e.g. http://tools.wmflabs.org/xtools-dev/ec/en.wikipedia.org/samwilson
It's still pretty slow, but that will be fixed via T163284: Optimize edit count queries in XTools (you may currently need to reload the page a couple of times, if it times-out).