#33025: Avoid accessing ConnectionsHandler.__getitem__ in Query.build_lookup 
unless
necessary, for performance.
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  Keryn
         Type:                       |  Knight
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"bf5abf1bdcedb15e949db419c61eeec7c88414ea" bf5abf1]:
 {{{
 #!CommitTicketReference repository=""
 revision="bf5abf1bdcedb15e949db419c61eeec7c88414ea"
 Fixed #33025 -- Avoided accessing the database connections in
 Query.build_lookup() when not necessary.

 Of the built-in backends, only Oracle treats empty strings and nulls as
 equal, so avoid testing the default connection backend for
 interprets_empty_strings_as_nulls if it can be established from the
 lookup that it wouldn't affect the lookup instance returned. This
 improves performance a small amount for most lookups being built,
 because accessing the connections requires touching the thread critical
 `Local` which is an expensive operation.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33025#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.04cffe08f674369afe5dda4d0f412e77%40djangoproject.com.

Reply via email to