Opened 6 years ago

Closed 6 years ago

Last modified 6 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: UI/UX:

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 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by Alexander Schepanovski

comment:1 Changed 6 years ago by Alexander Schepanovski

Owner: changed from nobody to Alexander Schepanovski
Status: newassigned

comment:2 Changed 6 years ago by Karen Tracey

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 Changed 6 years ago by Alexander Schepanovski

Triage Stage: AcceptedReady for checkin

comment:4 Changed 6 years ago by Luke Plant

A fix for #14195 might also fix this.

comment:5 Changed 6 years ago by Luke Plant

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 Changed 6 years ago by Luke Plant

(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