Skip to main content

Search and Top Navigation

#6670 closed bug (fixed)

Opened November 18, 2010 08:20PM UTC

Closed January 14, 2011 04:31PM UTC

Last modified April 12, 2011 12:36PM UTC

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:

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)

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.

Attachments (0)
Change History (7)

Changed November 18, 2010 08:40PM UTC by scottgonzalez comment:1

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.

Changed December 11, 2010 08:20PM UTC by scottgonzalez comment:2

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

Changed December 16, 2010 12:55PM UTC by scottgonzalez comment:3

#6754 is a duplicate of this ticket.

Changed January 13, 2011 09:15PM UTC by scottgonzalez comment:4

Core ticket to improve performance of .children:

Changed January 14, 2011 04:31PM UTC by scottgonzalez comment:5

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.

Changed April 12, 2011 12:27PM UTC by jorisdekinder comment:6

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.

Changed April 12, 2011 12:36PM UTC by scottgonzalez comment:7

Yes, this is as fixed as it will ever be. See which is the underlying cause and for the best perf improvement that the core team was willing to land.