#36526: bulk_update uses more memory than expected
-------------------------------------+-------------------------------------
Reporter: Anže Pečar | Owner: Jason
Type: | Hall
Cleanup/optimization | Status: new
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* needs_better_patch: 0 => 1
* resolution: duplicate =>
* stage: Unreviewed => Accepted
* status: closed => new
Comment:
Replying to [comment:11 Simon Charette]:
> > I also wonder if we should consider a similar note to the one added in
#28231 for bulk_create and more efficient batching?
>
> Natalia, I think we should yes.
>
> My immediate reaction when reviewing the ticket was to have a look at
the `bulk_update` documentation and it's effectively not entirely clear
what ''batching'' refers to (query batching vs objects materialization).
52aa26e6979ba81b00f1593d5ee8c5c73aaa6391 made it very clear that manual
generator slicing must be used to prevent evaluation.
Reopening with the goal to add the clarification in the docs similar to
what `bulk_create` has.
--
Ticket URL: <https://code.djangoproject.com/ticket/36526#comment:12>
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 visit
https://groups.google.com/d/msgid/django-updates/01070198f218bb54-03c74f43-78d1-441e-b9eb-bfef0a01c89d-000000%40eu-central-1.amazonses.com.