Cyclic reference in FieldFile causes memory usage to grow considerably
|Reported by:||Gustavo Narea||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.1|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
django.db.models.fields.files:FieldFile creates a cyclic reference to the model instance it's attached to via django.db.models.fields.files:FileDescriptor.
The effects can be considerable. In our Web site, for example, it causes the process running Django to increase the memory used by over 1MB after every request.
The patch is generated against Django trunk, even though it's only been tested under Django 1.1.4 (but the cyclic reference doesn't seem to have been fixed).
Change History (10)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|
comment:4 Changed 5 years ago by
|Summary:||Cyclic reference in FieldFile → Cyclic reference in FieldFile causes memory usage to grow considerably|