Opened 6 years ago

Last modified 3 years ago

#15097 new bug

Sortable in 1.12.x much (min 3x) slower than 1.11.x

Reported by: cucko Owned by:
Priority: minor Milestone: none
Component: ui.sortable Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:


Here are two js fiddle examples

jq ui 1.11.4:

jq ui 1.12.0:

jq ui 1.12.1:

Change History (5)

comment:1 Changed 6 years ago by Daijobou

I can confirm this problem. I have a page with six lists and summary ~3000 items. Chrome crashes with this browser tab, but only with version jquery ui 1.12.1. Sortable in version jquery ui 1.11.4 working fast and fine as replacement.

Other source:

comment:2 Changed 5 years ago by Stephane

I can confirm the issue as well

comment:3 Changed 5 years ago by syddiqua

Same problem. Anyone will fix it after a year?.. 900 elements take 55sec, with 1.11.4 it takes only a few.

comment:4 Changed 4 years ago by naitsirch

Same problem here. I have a small snippet to reproduce the issue:


<script src=""></script>
<script src=""></script>
  var ul = jQuery('ul');
  for(var i = 0; i < 2000; i++) {
    ul.append(jQuery('<li>List item ' + i + '</li>'));

  ul.sortable({axis: 'y'});

I have found out that it is stuck when it assigns the class 'ui-sortable-handle' to the list's items (_setHandleClassName function).

The adding of the class takes longer for each item that has been processed.

Last edited 4 years ago by Ryan J Ollos (previous) (diff)

comment:5 Changed 3 years ago by Dustin

Through benchmarking I have confirmed this to still be a MAJOR performance issue for a large sortable and it still exists in v1.12.1. I have confirmed through benchmarking the following fix to this problem in jQuery UI v1.12.1 by modifying _setHandleClassName().


$.each( this.items, function() {
            this.instance.options.handle ?
                this.item.find( this.instance.options.handle ) :
    } );


$.each( this.items, function() {
                     ? this.item.find( this.instance.options.handle ) 
                     : this.item
            } );

I found this solution at

Last edited 3 years ago by Ryan J Ollos (previous) (diff)
Note: See TracTickets for help on using tickets.