Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise progress bars on course page #4169

Closed
wants to merge 15 commits into from

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Nov 17, 2022

This pull request optimizes the queries to load progress bars on the course page. This removes the need for partially loading the page as the slow elements are removed. All code for the partial load is thus also removed.

To optimize the queries I introduced an index. I also had to update the judged check for submission from NOT IN to IN (With the list of statuses inverted). Without this change mysql refused to use the provided index.

Replaces #4167

Below you can find the results of a speed comparison. For fair comparison I cleared my sql cache before each request. I tested on https://dodona.ugent.be/nl/courses/359/ which is a rather large course.

  • Old: 2421ms/1798ms/1887ms
  • Load course with all series: 14446ms/13961ms
  • Load course with only progress bars hidden: 2445ms/2345ms/2298ms/2513ms
  • Fix table height for not fully loaded series #4167: 1875ms/1900ms/1991ms
  • New: 1027ms/1049ms/918ms/876ms/1060ms

Closes #3962 .
Closes: #4167

PS: this pr also contained some changes to the generated database file.
This is probably caused by me having a backup of production on my machine.
I would keep these changes in as they reflect the state of the production database.

@jorg-vr jorg-vr added the enhancement A change that isn't substantial enough to be called a feature label Nov 17, 2022
@jorg-vr jorg-vr self-assigned this Nov 17, 2022
@jorg-vr jorg-vr marked this pull request as ready for review November 17, 2022 09:21
@jorg-vr jorg-vr requested a review from a team as a code owner November 17, 2022 09:21
@jorg-vr jorg-vr requested review from bmesuere and niknetniko and removed request for a team November 17, 2022 09:21
@chvp chvp self-requested a review November 17, 2022 09:24
@jorg-vr jorg-vr marked this pull request as draft November 17, 2022 12:11
@jorg-vr jorg-vr closed this Nov 22, 2022
@jorg-vr jorg-vr deleted the enhance/speed-up-course-load branch December 6, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A change that isn't substantial enough to be called a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Series navigation should always bring selected series to top of viewport
1 participant