I've run into a significant performance issue with the form plugin's
serialize method; not a bug per se, but definitely a show-stopper for
me. The problem is that I have a form with a select element, which has
around 250 options. The serialize method grabs *all* child elements of
the form before operating on any of them, like so:

$('*', this).each( ... );

This is awfully inefficient, especially considering each element type is
handled by name anyway in the following code. Perhaps it would be best
to define the top-level or containing elements first, then grab just
those (i.e., excluding OPTIONs):

var elems = ['INPUT', 'SELECT', 'TEXTAREA', ...]
$(elems.join('|'), this).each( ... );

So instead of looking through each OPTION for a selected property, the
parent SELECT could be checked for its selectedIndex property. Any
thoughts?

m.

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to