Changes between Version 1 and Version 2 of Ticket #36526


Ignore:
Timestamp:
Jul 27, 2025, 4:24:47 AM (6 weeks ago)
Author:
Anže Pečar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36526 – Description

    v1 v2  
    1919[https://github.com/anze3db/django-bulk-update-memory A GitHub repository that reproduces the problem with memray results.]
    2020
     21As we can see from the [https://github.com/user-attachments/assets/dd0bdcac-682f-4e79-aa25-aa5a4a2e6b9d memray flamegraph] the majority of the memory in my example (2.1GB) is used to prepare the when statement for all the batches before executing them. If we change this to generate the when statement only for the current batch the memory consumption is going to be greatly reduced. I'd be happy to contribute this patch unless there are concerns on adding more compute between update queries and making the transactions longer. Let me know :)
     22
    2123This might be related to https://code.djangoproject.com/ticket/31202, but I decided to open a new issue because I wouldn't mind waiting longer for bulk_update to complete, but the SIGTERM surprised me.
Back to Top