#32244: ORM inefficiency: ModelFormSet executes a single-object SELECT query per
formset instance when saving/validating
-------------------------------------+-------------------------------------
Reporter: Lushen Wu | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: formsets | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
Hi powderflask — no problem. :)
> Here's why I think the Queryset / ModelChoiceField is redundant and
could be replaced by a simpler type of field...
I think the way forward here would be for you to provide a proof-of-
concept. Then folks could assess properly whether it were viable.
> … for reference, I have forms where >500 entries are being submitted, so
the DB lag is non-trivial
Sure. It's in this case that I provide pre-calculated `choices` to avoid
the overhead (as per above).
--
Ticket URL: <https://code.djangoproject.com/ticket/32244#comment:16>
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/01070183ac3df691-95d78142-8c4a-4520-9add-c97af566ff36-000000%40eu-central-1.amazonses.com.