I have a component which displays a UI similar to a spreadsheet. There are lots of elements with two way binding [(ngModel)] to a mutable Object.
As soon as the number of inputs grows past 100 or so inputs the UI becomes sluggish. The profiler shows a lot of time in Decimal format (decimal pipe).
I can think of a couple of possible solutions:
- Using immutable objects somehow?
- Customising the 2 way databinding?
I am not using ChangeDetectionStrategy OnPush, but I am curious as to how this will help and how to actually implement it with [(ngModel)] on html inputs.
changeDetection: ChangeDetectionStrategy.OnPush?