I have a performance problem and I have not found a solution.
Context: I need to display a lot of data (500 rows, 8 columns) in a table. To display this data, I decided to use a Smart table because it offers good functionality, but the problem is that I have a lot of data and the data display time is very long (5-9 seconds, it depends on the performance of the device).
The important thing: I need to display all the data, so I do not need a way of pagination, a filter of restrictions.
So this code works:
<ion-scroll class="scrollVertical" direction="xy" overflow-scroll="true" > <table st-table="tableaux" class="table table-striped"> <thead> <tr> <th ng-repeat="column in ColumnTable">{{column.Label}}</th> </tr> <tr> <th ng-repeat="column in ColumnTable"> <input st-search="{{column.Id}}" placeholder="" class="input-sm form-control" type="search" ng-model="inputRempli"/> </th> </tr> </thead> <tbody> <tr ng-repeat="row in tableaux"> <td ng-repeat="column in ColumnTable" ng-init="colonne = column.Id">{{row[colonne]}}</td> </tr> </tbody> </table> </ion-scroll>
I read that Ionic made a ( collection-repeat ) directive that allows an application to display huge lists of items much more realistically than ng-repeat. So I tried to redo my solution using the replay collection, but that wont work ...
Solution for collecting code collections:
<ion-scroll class="scrollVertical"> <table st-table="tableaux" class="table table-striped"> <thead> <tr> <th ng-repeat="column in ColumnTable">{{column.Label}}</th> </tr> <tr> <th ng-repeat="column in ColumnTable"> <input st-search="{{column.Id}}" placeholder="" class="input-sm form-control" type="search" ng-model="inputRempli"/> </th> </tr> </thead> <tbody> <tr collection-repeat="row in tableaux" item-width="200px" item-height="100px"> <td collection-repeat="column in ColumnTable" ng-init="colonne = column.Id" item-width="100px" item-height="100px">{{row[colonne]}}</td> </tr> </tbody> </table> </ion-scroll>
Error: Maximum Call Stack Size Exceeded
Questions: is there any angular or ionic solution to improve the performance of a smart table with a lot of data? What happened to my repeat collection?
source share