TUM-Dev / gocast

TUMs lecture streaming service.
https://live.rbg.tum.de/
MIT License
183 stars 42 forks source link

load stream progresses in one query #1136

Closed joschahenningsen closed 1 year ago

joschahenningsen commented 1 year ago

Motivation and Context

Currently, we load stream progresses in multiple queries for each request. Especially for admins visiting the start page, this is very inefficient.

Description

Unify the db query to accept multiple ids and return all progresses. I simulated a slow database connection by connecting to a remote database via vpn and observed the timings of the endpoint /api/progress/streams:

github-actions[bot] commented 1 year ago

Your Testserver will be ready at https://1136.test.live.mm.rbg.tum.de in a few minutes.

Logins | Kurs1 | Kurs2 | Kurs3 | Kurs4 | | ---------------------------------------- | ------------------------- | ------------------------- | ------------------------- | | public | public | loggedin | enrolled | | prof1 | prof1 | prof2 | prof1
prof2 | | student1
student2
student3 | student1
student2 | student2
student3 | student1
student2 |