Opened 4 years ago

Closed 4 years ago

#16811 closed Cleanup/optimization (wontfix)

Reset connection.queries only when DEBUG = True

Reported by: aaugustin 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

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 aaugustin 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by aaugustin

comment:1 Changed 4 years ago by Alex

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 4 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

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

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