Opened 6 years ago
Last modified 5 years 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 )
JQuery UI - 1.12.1 JQuery - 3.2.1
Steps to reproduce:
- Go to official autocomplete combobox example: https://jqueryui.com/resources/demos/autocomplete/combobox.html
- Save its source to local web server. Next edit page source and make number of LI elements 10x more (i.e. use copy-paste).
- Run page.
- 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 6 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 5 years ago by
comment:3 Changed 5 years ago by
Performance issue still exists with JQ 3.3.1 and JQUI 1.12.1 used together.
Question: code suggestion in #10050, where is that code to be inserted?
I think this can be considered duplicate of 10050