Ext JS very slowly checks / cancels the removal of nodes in the tree from version 4.2

I use the cascadeBy function and record.set ('checked', checked); to check / unmark the child nodes in the Ext JS tree. In version 4.0.7 and 4.1 EXT JS everything works quickly. But when I upgrade my project to version 4.2, this operation uses more than 4 times more time.

Here is an example:

http://jsfiddle.net/CaV3n/1/

checkchange: function (record, checked, opts) {

    var i=0;
    var start=new Date;
record.cascadeBy(function(e) {

    i++;
    e.set('checked', checked);
    });
    var stop = new Date;
    alert(i +'items '+ (stop-start)+'ms');

}

if I use version 4.2.0 I have 132 elements displayed in 2677 ms

if I use version 4.1.0 I have 132 elements displayed in 735 ms

if I use version 4.1.1 I have 132 elements displayed in 645 ms

How can I improve tree speed?

+4
1

ExtJS "/"

suspendLayouts()

    checkchange: function (record, checked, opts) {
        var i = 0;
        var start = new Date();
        panel.suspendLayouts();
        record.cascadeBy(function (e) {
            i++;
            e.set('checked', checked);
        });
        panel.resumeLayouts();
        var stop = new Date();
        alert(i + 'items ' + (stop - start) + 'ms');

    }

:

http://jsfiddle.net/Vandeplas/8Dq2s/

1/10 ... 60ms!

"" .

+8

Source: https://habr.com/ru/post/1530056/


All Articles