Ticket #4410: speed.patch

File speed.patch, 970 bytes (added by cardmagic, 10 years ago)

Correct patch file

  • ui/ui.sortable.js

     
    5252
    5353                if(this.options.disabled || this.options.type == 'static') return false;
    5454
    55                 //We have to refresh the items data once first
    56                 this._refreshItems(event);
    57 
    5855                //Find out if the clicked node (or one of its parents) is a actual item in this.items
    5956                var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
    6057                        if($.data(this, 'sortable-item') == self) {
     
    8380                var o = this.options, self = this;
    8481                this.currentContainer = this;
    8582
    86                 //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
     83                // moving the refreshItems call to mouseCapture slows things down big time with large lists
     84                this._refreshItems(event);
    8785                this.refreshPositions();
    8886
    8987                //Create and append the visible helper