#3202: [patch] Faster SelectBox for ManyToMany
-------------------------------+------------------------------------
     Reporter:  gkelly@…       |                    Owner:  xian
         Type:  New feature    |                   Status:  new
    Component:  contrib.admin  |                  Version:  SVN
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by illogical):

 The line
 {{{
         box.options.length = 0; // clear all options
 }}}

 takes several seconds to complete with just about 2.5k entries in the
 select box on IE9, other IE versions seem to be affected as well.
 Right now I don't have time for this, but maybe I can provide some test
 results later on.

 It seems to perform way better when I replace this with

 {{{
         while (box.hasChildNodes()) {
                 box.removeChild(element.firstChild());
         }
 }}}

 which also seems much more sane to me.
 Another way might be to set innerHTML to "".

-- 
Ticket URL: <https://code.djangoproject.com/ticket/3202#comment:16>
Django <https://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