nestedSortable
nestedSortable copied to clipboard
performance loss with jquery-ui 1.12
hello, i have a big lose of performance when i use jquery-ui 1.12
for 935 elements : 2min30 and 2,5sec with jquery-ui 1.11.4
thx in advance
Definitely can confirm this behavior. Thanks for taking the time to open this issue on GitHub. It was just the hint I needed to fix it.
no problem 👍
This is a jquery ui bug but editing your jquery ui js file you can patch the problem...
See: https://bugs.jqueryui.com/ticket/15097#comment:5 https://stackoverflow.com/questions/20398400/jquery-ui-sortable-call-is-slow-when-applies-to-thousands-of-elements
Find _setHandleClassName()...
Change:
$.each( this.items, function() {
that._addClass(
this.instance.options.handle ?
this.item.find( this.instance.options.handle ) :
this.item,
"ui-sortable-handle"
);
} );
to:
$.each( this.items, function() {
(this.instance.options.handle
? this.item.find( this.instance.options.handle )
: this.item
).addClass('ui-sortable-handle');
} );