#15206 closed Cleanup/optimization (fixed)
Group: use select_related for permissions on admin change_form
Reported by: | Chris Adams | Owned by: | Chris Adams |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
django.contrib.auth uses select_related on the User permissions manytomany widget but does not on Group, causing O(n) queries when generating the page.
Attachments (2)
Change History (8)
by , 14 years ago
Attachment: | django-15206.patch added |
---|
comment:1 by , 14 years ago
Status: | new → assigned |
---|
comment:2 by , 14 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
This can be tested using assertNumQueries in a test within the admin_views regression tests.
comment:3 by , 14 years ago
milestone: | → 1.3 |
---|---|
Needs tests: | unset |
Version: | 1.2 → SVN |
Updated against trunk with assertNumQueries regression tests for both group and user permissions:
https://github.com/acdha/django/compare/master...bug-15206-1.3
by , 14 years ago
Attachment: | django-15206-1.3.patch added |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Cleanup/optimization |
Note:
See TracTickets
for help on using tickets.
Simple patch against 1.2.X: https://github.com/acdha/django/compare/django-1.2.X...bug-15206