smogon / pokemon-showdown-client

The client for Pokémon Showdown
http://pokemonshowdown.com
GNU Affero General Public License v3.0
560 stars 786 forks source link

1250 Replays limit in a search #1726

Closed grenvol closed 3 years ago

grenvol commented 3 years ago

By digging, I noticed a limit to only the last 1250 replays (25 pages) when going backwards in a search, it is pretty limitating when trying to make metagames analysis based on it since over the 1250 there are around 3% that belong to the same person using the same team. I'm not sure why there is such limit, loading time is still fast (200ms) when trying to get the 25th page. Having access to up to 100 page would be a good improvement to start with.

It's written in the code there: https://github.com/Zarel/Pokemon-Showdown-Client/blob/master/replays/search.php#L116

Zarel commented 3 years ago

The limit is there for database performance reasons. I don't feel comfortable raising it at this time. 200ms isn't very fast from a hostile attacker's perspective.

grenvol commented 3 years ago

@Zarel Fair, but is there any way to see older replays?

KamilaBorowska commented 3 years ago

Is there a reason why we use OFFSET pagination instead of keyset pagination?

Zarel commented 3 years ago

Fair, but is there any way to see older replays?

@grenvol yes, you just can't search them.

Is there a reason why we use OFFSET pagination instead of keyset pagination?

That might be a good thing to change, yes.