Almost every method of QuerySet clones it. Sometimes it is very ineficcient, for example when querysets are constructed in loops. I have a function, which makes about 20 queries, and its execution time is about 100ms. After profiling the function, I saw that clone() takes most of the time: 70ms. It is called about 60 times, 1ms per call. The queries themselves are very fast (about 15ms for all queries). So constructing the query takes much longer time than executing it. What cloning is needed for? Can I prevent queryset from cloning, or do something else to reduce cpu consumption?
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.