Testaustime / testaustime-backend

https://api.testaustime.fi
MIT License
12 stars 11 forks source link

perf: use diesel_async and improve queries #102

Closed lajp closed 11 months ago

lajp commented 11 months ago

Diesel has some issue on complex queries and therefore we have to rely on multiple queries in some cases.

Regardless of that this is still a massive improvement on the current implementation. For example the endpoint /users/@me/leaderboards is sped up roughly by a factor of 37.

before:

image

after:

image

The performance of /friends/list is also drastically improved.

lajp commented 11 months ago

This is now ready for review.