Posted 30 June 2020, 6:20 pm EST
Hi guys,
I’m facing a huge performance issue with that kind of code :
<wj-flex-grid-column header="Total" [binding]="'Total'" [aggregate]="'Sum'">
<ng-template wjFlexGridCellTemplate [cellType]="'Group'" let-cell="cell">
<span i18>srv:</span> <b>{{ myCustomCalculation(cell) }}</b>
</ng-template>
</wj-flex-grid-column>
The combination of :
- Angular change detection, which triggers the myCustomCalculation function a HUGE lot of time,
- myCustomCalculation function is dealing with/aggregating all the records of the cell.item.items,
- the groups descriptions that are at the user’s discretion often results with nested GroupRows (I saw up to 6 levels) and then many, many GroupRows…
obviously makes the whole thing unmanageable.
So, considering the function call in the view data-binding beeing a bad pattern, how would you advice to solve the issue ?
I tried to calculte the aggregated results in some variables, but having nested (and user-managed) groups makes it tricky.
Maybe you have some code example or idea to help.
Thanks a lot !