#24702: Cache Query objects when possible
----------------------------------------------+--------------------
     Reporter:  thedrow                       |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 Currently Django constructs the Query objects every time you query the
 database.
 This is often unnecessary and can be avoided.
 I started memoizing some of the Query objects that the manager creates but
 I encountered some test failures related to prefetch_related querysets.
 This is the memoized manager implementation
 https://github.com/thedrow/django/blob/feature/memoized-
 manager/django/db/models/manager.py#L244
 I'm not sure it should be in a separate class but I created another one
 because of some of the required API changes.
 Can anyone explain the test failures?

--
Ticket URL: <https://code.djangoproject.com/ticket/24702>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.b87954a87b1ca2536f7456a9325c56d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to