Save call is getting delayed when there is huge rows of data

Tags: #<Tag:0x00007f8b1ad67070>

Hi,

In our application, if there is huge rows of data like 1000 lines. The Save call is very slow. Tried batchRender functions as well. Still unable to solve the issue.

Added save code here,

let rowNewIndex = [this.coords.row]; // Signifies only the current selected row
instance.validateRows(rowNewIndex, (valid: any) => {
if (valid) {
loaderStatus = false;
if (this.editedRows.length) {
if (this.newlyAddedRows.length == 0) {
const payLoadUpdate = this.payLoadForSave(this.editedRows, ‘update’, prefix.updateRequestPayload);
this.dccService.getTableDetails(prefix.updateAPI, payLoadUpdate).subscribe((response: any) => {
if (response.status === ‘SUCCESS’) {
this.editedRows = [];
this.itemCode = ‘’;
} // API CALL
this.resetTableSpecifications(response, this.editedRows, this.newlyAddedRows,
this.deletedRows, ‘update’, item, index, typeofsave); // Function call to refresh the table and call expected api calls
});
}

The above code is faster when there is less than 50 rows of data in handsontable.
I am restricted to share the full code due to confidentiality and unable to reproduce the issue with demo code, as we have lot of customizations to the table.

Is there any possibility to avoid performance delay on save?

Thanks,
Karthikeyan

Hi @kvengadachalam

If batch operation don’t help with your case the other solution I can think of is to use pagination and divide the table to smaller chunks.

Hi,

We will try it out and get back here.

Thanks,
Karthikeyan

Hi @kvengadachalam

did you already have time to test batch()?

Hi, Actually batch render didn’t helped much. So, we have set fixed height for the table. This actually helped us to improve performance on huge data of records.

I understand. Thank you for the update. I guess that we can close this topic.

1 Like