On Tue, Jun 29, 2010 at 6:04 PM, chadc <chadco...@hotmail.com> wrote:
> Hi there,
>
> I have been experiencing poor performance with django-admin when
> list_editable includes ForeignKey fields. In particular, rendering the
> changelist requires O(m*n) database queries where m is the number of
> ForeignKey fields included in list_editable and n is the number of
> rows in the changelist. I have searched extensively for possible
> causes and, after finding nothing and receiving no response on either
> django-users ('list_editable duplicate queries') or IRC, I am starting
> to think that it is a legitimate bug.

While this is worth to cache, you need to index the cache using a
serialized query, not the model.

It is possible to have a different set of choices for each model
instance (for example applying extra filter using another field's
value).

-- 
Patryk Zawadzki

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to