I am currently working with Angular2-RC.1 and I've noticed a significant decrease in performance when setting up a component with a large dataset. The component I'm using is a tabular one (which involves Handsontable) and it has an Input property called "data" that can be bound to external data. Typically, this property is connected to a sizable array containing around one hundred thousand rows.
Upon setting the large dataset, I've observed that the change detection process triggers a full comparison of values across the entire array within the host component (not the original owner of the input property).
@Component({
selector: "ha-spreadsheet",
template: "<hot-table [data]="data"></hot-table>",
directives: [ HotTable ],
encapsulation: ViewEncapsulation.Emulated
})
export class Spreadsheet implements OnActivate {
data: { rows: Array<Array<number>> };
load(service) { this.data = service.getLargeDataSet(); }
}
Here, I present a callstack indicating that the change detection operation is initiated throughout the entirety of the data. (the bold method represents the automatically generated runtime change detection function for my host component) rather than simply comparing references.
https://i.sstatic.net/Kvagp.png
Is this behavior intentional?