treegrid sourcedata change lead to perfomance problem

i was custom a dialog form to change row data, then i try to rerender sourcedata like this:

this.data[0] = {TaskID: '123', name: 'vb'}
this.data = [...this.data]


but i have more than 50k data, and i was using virtualization mode, datasource rerender took's more than 6s, any advise?


6 Replies

HB Hewen Bin April 25, 2022 11:37 PM UTC

and also, i need to do crud to column, here's same problem.



PS Pon Selva Jeganathan Syncfusion Team April 26, 2022 02:59 PM UTC

Hi Parth,


Thanks for contacting syncfusion forum.


Query:  i have more than 50k data, and i was using virtualization mode, datasource rerender took's more than 6s, any advise?


We checked your query by preparing a sample, but we were unable to reproduce the issue at our end.


Please refer to the below sample:

https://stackblitz.com/edit/angular-3hd2ht?file=app.component.ts


Still if you are facing any issue, kindly get back to us with the below requested details,


  1. Complete treegrid code example(both ts and html)
  2. Share the product details version.
  3. Share the issue reproducible sample or reproduce the issue in our shared sample.


The provided information will be helpful to provide you response as early as possible. 


Query:  i need to do crud to column, here's same problem


Before we start proceeding with your query, we request you to share with us the details below to provide you with the solution as early as possible. 


1.       Share the detailed explanation of your requirements.

2.       Share the video demo/Screenshot of the requirement.

3.       Share the complete code example of your requirement

4.       If possible, kindly share the simple sample of your requirement.

5.       Share the product detail version.


Kindly get back to us for further assistance.


Regards,
Pon selva



HB Hewen Bin April 27, 2022 06:09 AM UTC

here' s my sample

https://stackblitz.com/edit/angular-3hd2ht-jjwnnu?file=app.component.html


it needs more than 2s to rerender, in some machine it took's more than 6s



PS Pon Selva Jeganathan Syncfusion Team April 28, 2022 04:15 PM UTC

Hi Hewen,


Thanks for the update.


We are working on this query with high priority. And we need time to find a feasible solution to the issue and will update you with further details by 2nd May 2022


Until then we value your patience.


Regards,
Pon selva




PS Pon Selva Jeganathan Syncfusion Team May 2, 2022 03:51 PM UTC

Hi Hewen,


Sorry for the inconvenience caused.


We are able to reproduce the issue at our end. We are working on this query with high priority. And we need time to validate the issue and will update you with further details by 4th  May 2022 without fail


Until then we value your patience.


Regards,
Pon selva



PS Pon Selva Jeganathan Syncfusion Team May 4, 2022 02:17 PM UTC

Hi Hewen,


Thanks for your patience.


Query: treegrid sourcedata change lead to perfomance problem


On further validation, we suggest that you show the waiting popup while changing the data.


Please refer to the below code snippet,

 

 <ejs-treegrid

    #treegrid

    [dataSource]="vData"

    (rowDataBound)="onRowBound($event)"

    (actionComplete)="actionComplete($event)"

  >

 

click() {

…..

 

    //this.vData.filter((items) => (items.Col5 = 'option3'));

 

    this.vData = this.vData.map((item=> {

      return Object.assign(item, { Col5: 'option3' });

    });

 

    this.treegrid.showSpinner();

  }

  

 

  actionComplete(args) {

    if (args.requestType == 'refresh') {

      this.treegrid.hideSpinner();

      ….

    }

  }

}

 

 


In the above code snippet, we show the popup in button click event using showSpinner method. And in action complete event, hide the popup using hideSpinner method.


Please refer to the below sample,

https://stackblitz.com/edit/angular-3hd2ht-uwa7eh?file=app.component.ts


Please refer to the below API documentation,

https://ej2.syncfusion.com/documentation/api/treegrid/#showspinner

https://ej2.syncfusion.com/documentation/api/treegrid/#hidespinner


Kindly get back to us for further assistance.


Regards,
Pon selva




Loader.
Up arrow icon