#15577: inefficient design of inlinemodeladmin ----------------------------------+--------------------------- Reporter: yoav@… | Owner: nobody Status: new | Milestone: Component: django.contrib.admin | Version: 1.2 Keywords: | Triage Stage: Unreviewed Has patch: 0 | ----------------------------------+--------------------------- The problem we are trying to highlight is that with larger datasets, the inline admin is extremely inefficient and becomes impossible to work with. It loads the ENTIRE dataset and dumps it into the page as options. This is fine for small-ish data-sets, but unworkable with bigger ones.
We have created a small project on github to demonstrate this issue https://github.com/Azd325/django-admin-inline-bug This was tested with Django 1.2.5 as well as the latest trunk and produces the same results. The project includes code taken directly from the Django documentation, with no further changes. i.e. http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#working-with-many- to-many-models We have used the Person<->Membership<->Group many-to-many model. The initial data (included in the fixtures) creates 10,000 Person records on the database, with a single Group object, of which there is only one member currently. Managing the group via django admin (e.g. /admin/big_group/group/1/) shows that the page includes ALL people, regardless of group membership, as a HTML select. The HTML would include this: {{{ <select name="membership_set-0-person" id="id_membership_set-0-person"> <option value="">---------</option> <option value="1" selected="selected">Person object</option> <option value="2">Person object</option> <option value="3">Person object</option> ... <option value="9999">Person object</option> }}} and it does it not only once, but as many times as there are members. So if you have a 10,000 person records, with 100 members of a group, changing the group membership via the django admin would load 1,000,000 records into the HTML. Perhaps the inline design should change to only load the right objects that are part of the relationship (with an option to add/delete/modify). Otherwise, maybe the documentation should highlight this potential issue, so users of django admin inlines are aware of it. Tim Kleinschmidt + Yoav Aner -- Ticket URL: <http://code.djangoproject.com/ticket/15577> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.
