Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#15095 closed bug (fixed)

Autocomplete Combobox memory leak

Reported by: Adam Jimenez Owned by: Scott González
Priority: minor Milestone: 1.12.2
Component: ui.autocomplete Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description

There appears to be a memory leak with the autocomplete combobox. I can recreate it by going to the combobox demo in Chrome (54): https://jqueryui.com/autocomplete/#combobox

And then clicking the "show all items" button over and over. After around 50 times it starts to noticably slow down, keep going and it eventually slows to a crawl.

This is more apparent in my real world app, which is often left open for a long time and can contain many more autocomplete items.

Change History (5)

comment:1 Changed 7 years ago by rd3n

I am facing the same problem with my own jQuery-UI widget based on the widget factory and using the autocomplete widget internally.
But it is also reproducible with a simple test case (local source with 50 items and no filtering):

  • Tested on latest Chrome (57.0.2987.110) and Edge (38.14393.0.0)
  • Tested with latest jQuery (3.1.1) and latest jQuery-UI (1.12.1)
  • Reduced test case: http://codepen.io/rd3n/pen/MpVwLe
  • It takes about 10x more time for the suggestion list to be displayed after 30 openings on Chrome

Additional notes:

  • Firefox (52.0.1) is not affected
  • jQuery-UI (1.12.0) is also affected, but less importantly
  • jQuery-UI (1.11.4) is not affected

Edit: Seems to be related to other performance tickets already opened:

Edit 2: There is a workaround as described by jGeek314 in 10050 :

search: function(e,ui){
  $(this).data('ui-autocomplete').menu.bindings = $();
},
Last edited 7 years ago by rd3n (previous) (diff)

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

Resolution: duplicate
Status: newclosed

Duplicate of #10050.

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

Owner: set to Scott González
Resolution: duplicatefixed

In ef2e9ba:

Widget: Improve remove event bindings for classes options

Fixes #15078
Fixes #15082
Fixes #15095
Fixes #15136
Fixes #15152
Closes gh-1769

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

Milestone: none1.12.2

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

#15205 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.