#31096: Massively improving ManyToMany caching when using in forms
-------------------------------------+-------------------------------------
Reporter: László Károlyi | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 3.0
Severity: Normal | Resolution: needsinfo
Keywords: ORM Caching Forms | Triage Stage:
ManyToMany | Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* needs_better_patch: 0 => 1
* component: Database layer (models, ORM) => Forms
* resolution: => needsinfo
* needs_tests: 0 => 1
* version: 2.2 => 3.0
* needs_docs: 0 => 1
* type: Uncategorized => New feature
Comment:
Hi.
My initial thought here is that the invalidation logic is likely to be
far-too fragile to justify the additional complexity of code.
Refetching from the database after save operations is commonplace, simple
and reliable. Whereas cache invalidation is notoriously difficult.
There would have to be a big performance gain, when saving is already an
expensive operation, so likely dominates the timings vs the refetch unless
you are dealing with many rows.
Major changes such as this should be taken to the DevelopersMailingList,
where if there is agreement to proceed we can track work with a ticket
here.
If you are to post to the mailing list, please think first about tests
demonstrating correctness, and ideally provide some kind of benchmark as
to the expected performance gains.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/31096#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.26c7ebf1eae9d1e0122aa68cbbeb71e4%40djangoproject.com.