Opened 13 months ago

Last modified 7 months ago

#15249 new bug

Autocomplete memory leak and CPU usage 100%

Reported by: Alexander Pravdin Owned by:
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Alexander Pravdin)

JQuery UI - 1.12.1 JQuery - 3.2.1

Steps to reproduce:

  1. Go to official autocomplete combobox example: https://jqueryui.com/resources/demos/autocomplete/combobox.html
  2. Save its source to local web server. Next edit page source and make number of LI elements 10x more (i.e. use copy-paste).
  3. Run page.
  4. Open and close the dropdown list 10 times.

Expected result: Dropdown list opened and closed normally and fast.

What happen instead: Every list open become slower and slower and after 10 openings it produce 100% CPU usege for 7 seconds (on my i5-3210M CPU)

As I can investigate the issue is that "this.bindings" array is doubled on every opening. And if you have an autocomplete with few hundred of elements (cities autocomplete list, for example) it become totaly unusable because of very large response lags.

This issue is not reproducable under jQuery 1.11.1 + jQueryUI 1.11.4

Proof: https://jsfiddle.net/wLw8mxo2/ (I used Chrome desktop browser and didn't tested under others) If you will change jQuery to 1.9.1 and jQueryUI to 1.9.2 inthis fiddle the issue will disappear.

Change History (3)

comment:1 Changed 13 months ago by Alexander Pravdin

Description: modified (diff)

comment:2 Changed 9 months ago by Mihai

I think this can be considered duplicate of 10050

comment:3 Changed 7 months ago by Dave Mausner

Performance issue still exists with JQ 3.3.1 and JQUI 1.12.1 used together. This should be labeled a major priority, because the ui autocomplete feature is essentially _disabled_ in 1.12.1.

Question: code suggestion in #10050, where is that code to be inserted?

Last edited 7 months ago by Dave Mausner (previous) (diff)
Note: See TracTickets for help on using tickets.