Project

Profile

Help

Issue #9262

closed

Django Lifecycle doubles memory usage of all "Content" objects due to change-tracking

Added by dalley over 2 years ago. Updated over 2 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Django Lifecycle has hook system that activates when fields on models are changed - in order to implement this, it keeps a copy of the initial state of all fields, so that it can tell when they change.

We do not benefit from this since content (at least, all content to date) are immutable, but we suffer significantly from it as it doubles the in-memory size of all content objects. When these objects are very large, as frequently occurs with the RPM plugin, this can be significant.

We should find a way to opt out of this functionality, or create one ourselves with an upstream contribution.

https://github.com/rsinger86/django-lifecycle/blob/9c0d1289568ea070d0e0a396980a29d6f9b7b959/django_lifecycle/mixins.py#L26


Files

Also available in: Atom PDF