#15957: ModelChoiceField slow performance
------------------------------------------------+------------------------
               Reporter:  uriel.bertoche@…      |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  closed
              Milestone:                        |      Component:  Forms
                Version:  1.3                   |       Severity:  Normal
             Resolution:  wontfix               |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
------------------------------------------------+------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 By definition, a !ModelChoiceField is going to include all elements in the
 queryset. I don't see how Django could do this faster than O(n). You
 shouldn't use !ModelChoiceField for more than 1000 entries. Anyway, it
 becomes very quickly unusable beyond 100 entries.

 See the documentation here:
 
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15957#comment:1>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to