Opened 13 years ago

Closed 13 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: dev
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

Description

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

Download all attachments as: .zip

Change History (3)

by Aymeric Augustin, 13 years ago

Attachment: 16811.patch added

comment:1 by Alex Gaynor, 13 years ago

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 by Aymeric Augustin, 13 years ago

Resolution: wontfix
Status: newclosed

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

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