Skip to main content

Search and Top Navigation

#15049 closed bug (notabug)

Opened September 16, 2016 12:58PM UTC

Closed October 12, 2016 03:55PM UTC

Last modified October 12, 2016 05:50PM UTC

Calling refresh several times makes it slower and slower

Reported by: TimePerformance Owned by: TimePerformance
Priority: minor Milestone: none
Component: ui.selectable Version: 1.12.0
Keywords: Cc:
Blocked by: Blocking:
Description

Each call to $el.selectable('refresh') is slower than the previous, starting from 200ms and going to more than 10 seconds. (for hundreds of selectees)

The problem comes from the line:

that._addClass( that.selectees, "ui-selectee" );

I have seen an issue for v1.12.0 and upgraded to v1.12.1, but it did not solve the problem.

Replacing the line above by:

that.selectees.addClass("ui-selectee");

solves the performance issue.

Attachments (0)
Change History (4)

Changed September 21, 2016 04:16PM UTC by scottgonzalez comment:1

version: 1.11.21.12.0

Changed September 21, 2016 11:02PM UTC by arschmitz comment:2

owner: → TimePerformance
status: newpending

I cannot reproduce this at all. I set up a test page which benchmarks the refresh function as you can see there is no upward trend

http://jsbin.com/zoxotu/edit?html,js,output is there something more i need to do to trigger this? I also tried selecting different sets in between refreshes and this made no difference

Changed October 12, 2016 03:55PM UTC by scottgonzalez comment:3

resolution: → notabug
status: pendingclosed

Closing due to inactivity.

Changed October 12, 2016 04:57PM UTC by henkpb comment:4

I have encountered a similar problem in my application, where selectmenu("refresh") gets slower and slower. Please check http://jsbin.com/nibibohigi/edit?html,js,output for a basic example.

I have seen that the

this.bindings = this.bindings.add( element ) 

in the _on method in $.Widget.prototype causes the problem. The list of bindings increases on each refresh - it ends up containing thousands of entries.