Open
Description
The issue is that your generateGrid
(https://github.com/bennadel/JavaScript-Demos/blob/master/demos/render-large-datasets-angular2-reactjs/angular.htm#L238) method creates new set of objects each time it runs. Angular 2 then has to remove the DOM and recreate all of the items for the purposes of animation. So the Angular perf test is doing a lot more then it should.
There are two ways to fix it:
- change
gerenerateGrid
to return an array with same identities. - change
*ngFor
(https://github.com/bennadel/JavaScript-Demos/blob/master/demos/render-large-datasets-angular2-reactjs/angular.htm#L88) to usetrackBy
See: https://github.com/angular/angular/blob/master/modules/angular2/src/common/directives/ng_for.ts#L86 (It will be in beta4)
Tho above should make Angular significantly faster.
More reading: mathieuancelin/js-repaint-perfs#19
Metadata
Metadata
Assignees
Labels
No labels