Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AngularJS performance test optimization #31

Open
JonathanZWhite opened this issue May 26, 2015 · 4 comments
Open

AngularJS performance test optimization #31

JonathanZWhite opened this issue May 26, 2015 · 4 comments
Milestone

Comments

@JonathanZWhite
Copy link

Hello,

If possible, please update your angular.js performance test cases with track by $index in each of the ng-repeats in order to even the playing field.

initial-load/angular.html

<tr ng-repeat="person in people track by $index">
   <td ng-repeat="column in columns track by $index">
       {{person[column]}}
   </td>
   <td ng-repeat="column in columns track by $index">
       {{person[column]}}
   </td>
</tr>

syncing-changes/angular.html

<tr ng-repeat="person in people track by $index">
    <td ng-repeat="column in columns track by $index">
        {{person[column]}}
    </td>
    <td ng-repeat="column in columns track by $index">
        {{person[column]}}
    </td>
</tr>
@astoilkov
Copy link
Owner

Cool. I will do that. I have tried the initial-load example with the code and I don't see any difference in performance. Do you see any benefit for updating the initial-load example?

@JonathanZWhite
Copy link
Author

Awesome. I suggested the change to the initial-load example as well for the sake of consistency.

@nhducit
Copy link

nhducit commented Sep 11, 2015

But angular gain a lot of performance in syncing-changes test. On my machine it reduces from 3534 to 385

@astoilkov
Copy link
Owner

Hey @nhduc296,

Yeah. You are absolutely correct. I have been super busy with a product I am building Caret and didn't have the time to update the site. I hope soon I will have a little more time to update the chart and other pending tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants