To better the performance I have modified the code logic as below:
Before Modification
This code has very low performance on filtering for larger amount of data (approx. 2000 and more).
<tr ng-repeat="item in ctrl.filteredReport = (ctrl.updatedData |
filter:ctrl.filterByQuarter:strict | filter:searchText)">
After Modification
This code has increased the performance drastically.
<tr ng-repeat="item in ctrl.updatedData"
ng-show="([item] | filter:ctrl.filterByQuarter | filter:ctrl.searchText).length > 0">
Problem
After modification, the problem is I am not able to get the length of the filtered report
which is being shown in the table.
Before modification, I was able to get the length of filtered report from
ctrl.filteredReport.length
.
Just for information
I have already tried the track by
and the performance did not increase as it did with ng-show
.
Let me know if more information is required to make the question more clear.