mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
832fafc6b5
This commit introduces a check plus an associated warning for situations where the combination of the collection change and the tracking expression resulted in the entire view structure managed by @for to be re-created. The check uses the following conditions before raising a warning: - the entire collection was re-created and there were no other operations (ex.: move); - views in a collection are considered "expensive" to re-create; - a developer is using tracking by identity. The last condition tries to capture cases where changes to immutable data collections can cause significent performance and / or corectness problems. Note that this warning might be "overreacting" and report cases where the collection re-creation is the intended behavior. Still, the assumption is that most of the time it is undesired. PR Close #55314