Search code examples
handsontable

Updating multiple rows on a large handsontable locks chrome


I have a handson table with 300+. It renders quickly. However, if I update one column in all rows like so:

function() {
    console.trace("Start", new Date());
    $scope.myData.forEach(function(elem, idx) {
        elem.properties.myCol = Math.random();
        if (idx % 100 == 0) console.trace("Tick", new Date());
    });
    console.trace("End", new Date());
};

The loop executes in less than a second, but the browser tab locks up and the page does not update for over a minute. Is there some way I can disable handsontable from reading updates to the array and then triggering a manual redraw? Is there any other way to speed this up?


Solution

  • The option that was slowing down rendering was columnSorting: true,. Removing this fixed the issue.