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

perf: Fixes N+1 queries while rendering the recover_list.html template #955

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

armonge
Copy link
Contributor

@armonge armonge commented Dec 19, 2023

While running a project with django-reversion and Sentry we found out there's one template that makes a query to the DB on every iteration. This PR fixes that

https://docs.sentry.io/product/issues/issue-details/performance-issues/n-one-queries/
https://docs.djangoproject.com/en/5.0/ref/models/querysets/#django.db.models.query.QuerySet.select_related

@etianen etianen merged commit 790f846 into etianen:master Dec 20, 2023
15 checks passed
@etianen
Copy link
Owner

etianen commented Dec 20, 2023

Very nice, I'll release shortly.

@armonge armonge deleted the perf/n+1-queries-on-recover-list branch December 27, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants