#16759: Expensive sql.Query cloning
-------------------------------------+-------------------------------------
     Reporter:  Suor                 |                    Owner:  Suor
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Ready for
     Keywords:  orm performance      |  checkin
  cloning                            |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by Suor):

 We also can make Constraint immutable that will simplify Node.clone() to:

 {{{
 def clone(self):
     clone = self.__class__._new_instance(
         children=[], connector=self.connector, negated=self.negated)
     for child in self.children:
         if isinstance(child, tuple):
             clone.children.append(child)
         else:
             clone.children.append(child.clone())
     for parent in self.subtree_parents:
         clone.subtree_parents.append(parent.clone())
     return clone
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16759#comment:9>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to