Best Available Solution for ng-repeat performance

I searched a lot and found below solution for this problem like

- collection-repeat 
(http://ionicframework.com/docs/api/directive/collectionRepeat/)

- Reactjs use (http://davidandsuzi.com/ngreact-react-components-in-angular/)

- oncejs use (https://github.com/tadeuszwojcik/angular-once)

For me best and easy to use is once js which is easy to use and also 
simpler one to integrate with existing code.

for more details feel free to ask.

thanks.

On Sunday, June 23, 2013 6:57:20 PM UTC+5:30, Noppanit Charassinvichai 
wrote:
>
> I'm facing some performance issue with ng-repeat and 1000+ `<tr>` some 
> googling tells me that I have to roll my own directive to overcome $digest 
> cycle. I don't understand what should I do about that? Can somebody please 
> explain this and how can I improve the performance. I have to show all the 
> 1000+ rows that's the requirement and right now it takes almost 20s to 
> create the entire table. 
>
> Thanks very much.
>
>     <tr ng-repeat="obj in objs" id="obj{{obj.id}}" 
> ng-show="displayObj(obj)">
>         <td>{{obj.objId}}</td>
>         <td style="min-width: 70px;">
>     <textarea rows="3" style="width: 100px" name="text" maxlength="100" 
> ng-model="obj.text"></textarea>
>     </td>
>     <td><button class="btn btn-primary" ng-click="saveObj($event, 
> obj)">Update</button></td>
>     </tr>
>
>
> In Controller
>
>     $scope.saveObj = function ($event, obj) {
>                     console.log(deal);
>                     var UpdateObj = ObjService.updateObj();
>                     var updateObj = new UpdateObj();
>     
>                     updateObj.text = obj.text;
>                     updateObj.$update({objId: obj.id});
>                 };
>
> Now I realised that the performance issue comes from $apply which I have 
> around 3000 elements. if I take ng-model off, the performance is better. 
> But I would lose two-way data binding. Is there anyway I could tune the 
> performance here?
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to