On Tue, 2007-10-09 at 15:56 -0400, Karen Tracey wrote: > I tried out the newforms-admin branch for my app today. The > conversion went fine, except for a performance problem with the new > raw_id_fields. As background, I have a model with two ForeignKey > fields (among other stuff). The number of choices for those > ForeignKey fields is high (over 100,000 for one of them). In the old > admin, I specified raw_id_admin=True on those fields in the model, > and all was well (not pretty, but usable). In the new admin, I > included these fields in raw_id_fields for the associated ModelAdmin > object. I know I specified it correctly because on the change form > for the model these two fields are displayed "raw-ly". However, the > change page for an instance of this model takes minutes to > display. Tracing through the code a little I can see that for each > of these fields a list of all possible values is getting generated > when the model's ChangeManipulator is created.
This raises some alarm bells. Why on earth are we futzing around in ChangeManipulators here? They are entirely oldforms-related and the whole point is to remove any reliance on them. This might well be a bug and in an area that just hasn't been addressed yet, since I'd wager not a lot of regular testing is going on with 100,000 objects in those cases. Probably worth a ticket, Karen. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---