Calling insertRow multiple times over many sheet data causes a slower performance since 2020.1.219.
http://dojo.telerik.com/EBEtaFOj (2020.1.114)
Hello Bo Yuan,
The decreased performance is caused by a fix for the following bug:
https://github.com/telerik/kendo-ui-core/issues/4845
The performance hit is caused by the more complicated call to the Math.max() method (after the change it is called with three parameters instead of two). As there is no way to improve the performance of that native JS method, the performance hit could not be avoided.
As per the scenario in question, when a Sheet is DataSource bound, inserting new empty items (lines) is always better done on the DataSource itself instead of the Sheet. The following change will increase considerably the performance of the scenario in question:
$("#btn").on("click", function() {
var newData = [];
var date = new Date();
var data = [];
for (var i = 0; i < 50; i++) {
var item = {};
for (var c = 0; c < 100; c++) {
item["col" + c] = null;
}
data.push(item);
}
sheet.dataSource.data(data.concat(dataSource.data().toJSON()));
alert((new Date() - date)/1000 + " seconds");
});
https://dojo.telerik.com/EFANEbId
Regards,
Veselin Tsvetanov
Progress Telerik