Opened 7 years ago

Closed 7 years ago

#16811 closed Cleanup/optimization (wontfix)

Reset connection.queries only when DEBUG = True

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


connection.queries is populated only when DEBUG = True, so it needs flushing only when DEBUG = True too.

This is a trivial performance optimization.

Attachments (1)

16811.patch (1.3 KB) - added by Aymeric Augustin 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Aymeric Augustin

Attachment: 16811.patch added

comment:1 Changed 7 years ago by Alex Gaynor

This patch isn't accurate, queries are logged when connection.use_debug_cursor is set to True, it fallsback to checking settings.DEBUG if it is unset, however it can be varied independently of settings.DEBUG, as assertNumQueries does.

comment:2 Changed 7 years ago by Aymeric Augustin

Resolution: wontfix
Status: newclosed

Right. Forget it. It's not worth touching this.

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