nestedSortable icon indicating copy to clipboard operation
nestedSortable copied to clipboard

performance loss with jquery-ui 1.12

Open fighter777 opened this issue 8 years ago • 3 comments

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

fighter777 avatar Apr 25 '17 15:04 fighter777

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.

ucjonathan avatar Sep 20 '18 17:09 ucjonathan

no problem 👍

fighter777 avatar Sep 20 '18 20:09 fighter777

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');
            } );

dustinbolton avatar Sep 22 '19 02:09 dustinbolton