You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve loading time for the achievements leaderboard.
Currently the user achievements are obtained from the database in the
user loop. This takes a long time when there are lots of users. So
instead, this gets all user achievements for all users before the loop
and references them by user id and then achievement id.
Testing this on a course for 5000 users shows this gives a significant
speed up on load time for the page. With the develop branch it takes
around 25 seconds, and with this branch it takes around 3 seconds.
Note that there were also two redundant queries (one that listed all
achievements and then one that fetched all achievements on lines 49 and
50 in the develop branch) for which the data from those queries was not
even used. Those were removed.
0 commit comments