#32948: Optimise Q combination and inversion
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  Nick Pope
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"845667f2d1eb7063c568764a01fc9ee633ec5817" 845667f2]:
 {{{
 #!CommitTicketReference repository=""
 revision="845667f2d1eb7063c568764a01fc9ee633ec5817"
 Refs #32948 -- Simplified and optimized Q._combine() and __invert__().

 - Removed use of Q.deconstruct() in Q._combine().
 - Simplified and optimized Q.__invert__() by taking a shallow copy and
   swapping the negated attribute only.
 - Simplified construction in Q._combine().
 - Simplified conditions in Q._combine() as Q.conditional = True the
   first isinstance() check is unnecessary.
 - Removed copy.copy() branch in Q._combine().

 Co-authored-by: Keryn Knight <[email protected]>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32948#comment:13>
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/010701823ed38c85-1dcd9cb1-49b7-48c1-814e-9f8018683846-000000%40eu-central-1.amazonses.com.

Reply via email to