speedruncomorg / api

REST API Documentation for speedrun.com
346 stars 36 forks source link

Potential 504 Timeout on `GET /users/{id}/personal-bests` especially when embedding data #170

Open xTVaser opened 1 year ago

xTVaser commented 1 year ago

Related to #95 and #96

Since these endpoints are not paginated when hitting a user that has a large amount of personal bests -- for example this user with over 800 https://www.speedrun.com/api/v1/users/v18q90jn/personal-bests?max=1 it is a very lengthy request if it is a cache-miss

If you then take it a step further and embed more data https://www.speedrun.com/api/v1/users/v18q90jn/personal-bests?embed=game,category.variables,level.variables&max=1 this will instead hit a timeout before the request can complete.

If the request could be paginated this would likely reduce the load and the request could complete.