#22330: Model.__reduce__() includes cached lookups
-------------------------------------+-------------------------------------
Reporter: patrys | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akaariai):
If nobody offers a good reason why this must be changed, I think we should
opt for keeping the current behavior. Sometimes you might actually want to
pickle the related instances, too. And, changes here might result in
performance changes for deployed applications, which are nasty to detect
when updating Django. One example is that caching results of
select_related queryset would not cache the related selections after the
change.
Above, the RuntimeError thrown by pickling looks like a good argument for
fixing. But as long as we don't have a test to reproduce this issue, it is
hard to say if the problem is in Django or how to fix the problem if it is
in Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/22330#comment:2>
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/064.f898cdba35b8502d0ad9ae01a3dcf538%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.