Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6670 closed bug (fixed)

Autocomplete very slow in IE for 500+ items

Reported by: jorisdekinder Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:

Description

When loading for example 500 items into the Autocomplete widget, setting minLength to 0 and just pressing the down key, the items are shown in about 4 seconds in IE8 for JQuery 1.4.4 and JQuery UI 1.8.5 (the newest version available in jsfiddle) http://jsfiddle.net/jorisdekinder/t7eRa/ When I try this on my Windows 7 laptop in a local html file with jquery 1.4.3 and JQuery UI 1.8.6 it's even taking 8 seconds. After profiling with the IE developer tools I found out that the slow parts are

  • .css({ top: 0, left: 0 }) on line 5003 in jqueryui-1.8.6.js : I think this can be removed as this was a workaround for a fixed bug.
  • uniqueSort on line 3092 called by refresh in jquery.ui.autocomplete.js on line 438 : maybe it's allowed to remove sorting? unless there's a good reason ofcourse, otherwise the sorting itself is hopefully improveable?

When I try these steps in a different IE, the same problems occur. When I try these steps in any other browser, the results come up blazingly fast.

Change History (7)

comment:1 Changed 12 years ago by Scott González

Milestone: TBD1.9
Status: newopen

.css({ top: 0, left: 0 }) can't be removed until 1.9 because we need to support older versions of jQuery.

comment:2 Changed 12 years ago by Scott González

Removed .css({ top: 0, left: 0 }) workaround in ca0ac5a64f6653fe8399a913538423b13d213307.

comment:3 Changed 12 years ago by Scott González

#6754 is a duplicate of this ticket.

comment:4 Changed 12 years ago by Scott González

Core ticket to improve performance of .children: http://bugs.jquery.com/ticket/7964

comment:5 Changed 12 years ago by Scott González

Resolution: fixed
Status: openclosed

I fixed the performance problem in jQuery core. I'd prefer just waiting for users to upgrade to a newer version of core than land a workaround in UI 1.8.x.

comment:6 Changed 12 years ago by jorisdekinder

Hi Scott, Should the issue be fixed now? When I test with the latest libraries (1.5.1 + UI 1.8.11) it still takes 5 seconds to show a list of 500 items... Thanks for looking into this.

comment:7 Changed 12 years ago by Scott González

Yes, this is as fixed as it will ever be. See http://bugs.jquery.com/ticket/7341 which is the underlying cause and http://bugs.jquery.com/ticket/7964 for the best perf improvement that the core team was willing to land.

Note: See TracTickets for help on using tickets.