Page MenuHomePhabricator

Rewrite Edit Counter with new backend architecture
Closed, ResolvedPublic8 Estimated Story Points

Description

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).

Event Timeline

kaldari renamed this task from Have Edit Counter use same architecture and front-end as the other pieces that have been re-written (articleinfo and topedits) to Have Edit Counter use same architecture and front-end as the other pieces that have been re-written.Mar 14 2017, 11:45 PM
kaldari triaged this task as Medium priority.
kaldari created this task.
kaldari set the point value for this task to 5.
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.
Matthewrbowker moved this task from Inbox to Working on the XTools board.Mar 22 2017, 11:11 PM

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?

Addshore removed a subscriber: Addshore.Mar 28 2017, 5:43 PM

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.

https://github.com/x-tools/xtools-rebirth/pull/15 is pretty much ready for review. There are still some weird bits, such as linking to other tools etc. but I think the basics of this task are done. Be warned: it's slow! There are lots of queries :-( (most are cached for 10 minutes).

Just one nit-pick from me and a suggestion from Matthew.

DannyH renamed this task from Have Edit Counter use same architecture and front-end as the other pieces that have been re-written to Rewrite Edit Counter with new backend architecture.May 15 2017, 11:07 PM
Samwilson changed the point value for this task from 5 to 8.May 15 2017, 11:08 PM

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).

Interface is a little off, but we will fix that :) I've been quietly observing updates to the backend code and I'm definitely a fan. +1 from me!

kaldari closed this task as Resolved.Jun 6 2017, 5:42 AM

Code is merged and seems to work (although extremely slowly).

MusikAnimal moved this task from Working to Complete on the XTools board.Jul 23 2017, 7:34 PM
Meno25 removed a subscriber: Meno25.Aug 26 2017, 10:28 AM