Changes between Version 1 and Version 2 of Ticket #23623


Ignore:
Timestamp:
10/09/14 12:01:33 (8 years ago)
Author:
Thomas Chaumeny
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23623 – Description

    v1 v2  
    11There is a huge memory consumption when using some admin pages with big production datasets (see also https://groups.google.com/forum/#!topic/django-users/YYlLWyBH_go).
    22
    3 I looked into the `ModelChoiceIterator` used to generate the choices for a `ModelChoiceField`, and noticed that an unused temporary queryset cache was generated due to the use of `.all()`, but unused (there is no variable pointing to the cloned queryset after the iteration).
     3I looked into the `ModelChoiceIterator` used to generate the choices for a `ModelChoiceField`, and noticed that an unused temporary queryset cache was generated due to the use of `.all()` (there is no variable pointing to the cloned queryset after the iteration).
    44
    55With the proposed PR, this cache is no longer generated. After applying the patch, I noticed that the maximum memory usage dropped from ~200MB to ~150MB for a model with about 30 000 instances.
Back to Top