maproulette3 icon indicating copy to clipboard operation
maproulette3 copied to clipboard

Leaderboard time selection: Consider removing 'Current Month' and 'Custom'

Open ljdelight opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. The MapRoulette leaderboard is held within a database table and updated on a recurring schedule. However, the table contains only the scores for: 1 month, 3 months, 6 months, 12 months, and All Time. If a UI user selects the "Current Month" or a "Custom" time span, that results in a query that builds a one-off leaderboard for that specific request which does not use the pre-computed values. The risk is those one-off calls bring down the stability of the site by taking too much time and slowing other queries down; note that the request must finish within 75 seconds before terminating with a 502 gateway error, and many of those one-offs will take more than 75 seconds. The user experience is not great if the site slows down or one-off leaderboard requests cause errors in that user's UI.

The one-off is very slow and does not scale to users, tasks, nor time spans. Because of the stated performance reasons, the UI selections and API support for 'Current Month' and 'Custom' should be considered for removal. The leaderboard queries should only inspect already generated data.

Screenshot from 2024-01-14 18-29-10

Describe the solution you'd like This first needs discussed on its merit and discuss the user's enjoyment/use/desire of the 'Current Month' and 'Custom' time spans. If those selections are not needed over stability, the request is to remove 'Current Month' and 'Custom' from the leaderboard time selections and the API.

Describe alternatives you've considered It's non trivial to change the API code to be more performant in some particular cases. There's too much data! Thus the reason for the recurring leaderboard rebuild tasks.

Additional context A screenshot is above for the specific items mentioned.

ljdelight avatar Jan 15 '24 01:01 ljdelight

We actually discussed the wording of these options in our recent dev sync and I was confused about what "current month" actually does. I'm clear on that now and would be okay with removing it. Can we replace it with a "past 30 days"? Or would that just shift the problem? Can we schedule this to run once a day?

I would want to keep the "custom" option. I figure this is not used too frequently (can we check?). If this is a problem we can perhaps make it harder to reach in the UI but still available for folks who really want it.

mvexel avatar Jan 19 '24 16:01 mvexel

@mvexel is my understanding correct that the Current Month selection be removed, and the Past Month be renamed to 'Past 30 days'?

I would want to keep the "custom" option. I figure this is not used too frequently (can we check?). If this is a problem we can perhaps make it harder to reach in the UI but still available for folks who really want it.

We'd need to verify, but I think it's fine to keep 'custom' if there's a max time span of, say, 3 months to limit the data it processes and avoid causing an outage.

ljdelight avatar Feb 02 '24 20:02 ljdelight

@mvexel is my understanding correct that the Current Month selection be removed, and the Past Month be renamed to 'Past 30 days'?

Yes.

I would want to keep the "custom" option. I figure this is not used too frequently (can we check?). If this is a problem we can perhaps make it harder to reach in the UI but still available for folks who really want it.

We'd need to verify, but I think it's fine to keep 'custom' if there's a max time span of, say, 3 months to limit the data it processes and avoid causing an outage.

That's fine by me. Ideally I'd like users to be able to go back 1y, but if that's not feasible with the current infra then please suggest what a feasible furthest past date would be.

mvexel avatar Jun 12 '24 15:06 mvexel