Issue #9262
closedDjango Lifecycle doubles memory usage of all "Content" objects due to change-tracking
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.
Files
Updated by dalley almost 3 years ago
- Status changed from NEW to CLOSED - NOTABUG
Everything above is true except that it seems like the copies are mere shallow copies (the reference count was incremented rather than duplicating the object). Therefore fixing this issue doesn't result in significant memory savings.