Given that the ListBox control is the native list box AFAIK, this would be a browser "bug"/performance issue. It is also discussed here:
http://social.msdn.microsoft.com/Forums/en-US/jscript/thread/6fbd21c7-fb5e-4090-b9e2-0d73f76d4891 Basically, the clear is just doing "select.options.length = 0", which _should_ be virtually instant but IE is doing something stupid. The suggested fix on the page above is simply to remove and recreate the list box -- which takes (reportedly) 0.02 seconds for a 3000 item list. Probably the size of the list is irrelevant. -brett On Jul 26, 3:49 pm, Dazza <[email protected]> wrote: > Calling listbox.clear() is very slow in IE for large list boxes when > compared to every other browser. > > I have several list boxes on a page that may contain several thousand > items each. I need to repopulate these on occasion. > > It seemed simple just to call listbox.clear() and then go through my > data load logic. This works absolutely fine in Firefox, Chrome and > Safari but performs very badly in IE. > > Is this just IE being slow as usual? Clearing a listbox seems like a > trivial task and should be fast, right? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
