Opened 14 years ago
Closed 14 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)
Change History (3)
by , 14 years ago
| Attachment: | 16811.patch added | 
|---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
| Resolution: | → wontfix | 
|---|---|
| Status: | new → closed | 
Right. Forget it. It's not worth touching this.
  Note:
 See   TracTickets
 for help on using tickets.
    
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.