Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14090 closed (fixed)

Many sql queries needed to display change user form

Reported by: Alexander Schepanovski Owned by: Alexander Schepanovski
Component: contrib.auth Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Permission.__unicode__ refers to content_type, so while rendering options for user_permissions field a sql query is executed to fetch every content_type for every permission.

Attachments (1)

auth.permissions.select_related.content_type.diff (620 bytes ) - added by Alexander Schepanovski 14 years ago.

Download all attachments as: .zip

Change History (7)

by Alexander Schepanovski, 14 years ago

comment:1 by Alexander Schepanovski, 14 years ago

Owner: changed from nobody to Alexander Schepanovski
Status: newassigned

comment:2 by Karen Tracey, 14 years ago

Triage Stage: UnreviewedAccepted

This is #13690 with a proposed fix, thanks. In a quick test on a random project the suggested change reduces the number of SQL queries for bringing up a change user page from 109 to 8.

comment:3 by Alexander Schepanovski, 14 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Luke Plant, 14 years ago

A fix for #14195 might also fix this.

comment:5 by Luke Plant, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [13683]) Fixed #14090 - Many sql queries needed to display change user form

Thanks to Suor for report and patch.

comment:6 by Luke Plant, 14 years ago

(In [13684]) Fixed #14090 - Many sql queries needed to display change user form

Thanks to Suor for report and patch.

Backport for [13683] from trunk.

Note: See TracTickets for help on using tickets.
Back to Top