-
Notifications
You must be signed in to change notification settings - Fork 73
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
Optimize the very inefficient database queries in the deviation list view #1302
Labels
area: performance
Related to the performance of the system
effort: days
Estimated to take less than one week, from the creation of a new branch to the merging
experience: beginner
required knowledge estimate
O1 needs
Requested in the Programming 1 course
requester: CS
The issue is raised internally by a CS teacher
type: bug
This is a bug
Milestone
Comments
markkuriekkinen
added
type: bug
This is a bug
O1 needs
Requested in the Programming 1 course
effort: days
Estimated to take less than one week, from the creation of a new branch to the merging
experience: beginner
required knowledge estimate
requester: CS
The issue is raised internally by a CS teacher
area: performance
Related to the performance of the system
labels
Oct 31, 2023
ihalaij1
added a commit
to ihalaij1/a-plus
that referenced
this issue
Nov 7, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
ihalaij1
added a commit
to ihalaij1/a-plus
that referenced
this issue
Nov 7, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
ihalaij1
added a commit
to ihalaij1/a-plus
that referenced
this issue
Nov 13, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
ihalaij1
added a commit
that referenced
this issue
Nov 13, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes #1302
murhum1
pushed a commit
to murhum1/a-plus
that referenced
this issue
Dec 21, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
ihalaij1
added a commit
to ihalaij1/a-plus
that referenced
this issue
Dec 22, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
ihalaij1
added a commit
to ihalaij1/a-plus
that referenced
this issue
Dec 22, 2023
The course module name is no longer queried separately for each deviation. This reduces the number of performed queries significantly. Additionally, some large unnecessary attributes are no longer loaded. Fixes apluslms#1302
Reopened since the page still doesn't load quickly enough. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: performance
Related to the performance of the system
effort: days
Estimated to take less than one week, from the creation of a new branch to the merging
experience: beginner
required knowledge estimate
O1 needs
Requested in the Programming 1 course
requester: CS
The issue is raised internally by a CS teacher
type: bug
This is a bug
#1122 presented performance issues in the deviations list page. This new issue focuses on specific performance issues.
Using the Django Debug toolbar, we have noticed that the database queries in the deviations list page include some very inefficient parts.
a-plus/deviations/templates/deviations/list_dl.html
Line 66 in 8f85614
select_related()
orprefetch_related()
been used incorrectly since the code tries to prefetch the course instances?a-plus/deviations/viewbase.py
Lines 254 to 265 in 8f85614
a-plus/deviations/viewbase.py
Lines 27 to 29 in 8f85614
only()
anddefer()
.exercise.exercise_info
is one of the unnecessary attributes in this case.The text was updated successfully, but these errors were encountered: