-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Control flow list diffing faster update #52227
Control flow list diffing faster update #52227
Conversation
The at operation is private and doesn't have to be part of the public interface.
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions.
Assuming that the trackBy function is a pure derivation from the collection object and its index, we can skip trackBy calculation if items in the live and new colelction have the same identity and index. Additionally this change minimizes access to the LContainer array.
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection).
Re-organize code to minimize number of calls to the trackBy function.
trackBy: TrackByFunction<V>): number { | ||
if (liveIdx === newIdx && Object.is(liveValue, newValue)) { | ||
// matching and no value identity to update | ||
return 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make constants for these (or a const enum
) to give semantic meaning to the return values.
This PR was merged into the repository by commit 7818d5c. |
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close #52227
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close #52227
Re-organize code to minimize number of calls to the trackBy function. PR Close #52227
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close #52227
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close #52227
Re-organize code to minimize number of calls to the trackBy function. PR Close #52227
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…gular#52227) The at operation is private and doesn't have to be part of the public interface. PR Close angular#52227
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close angular#52227
…on (angular#52227) Assuming that the trackBy function is a pure derivation from the collection object and its index, we can skip trackBy calculation if items in the live and new colelction have the same identity and index. Additionally this change minimizes access to the LContainer array. PR Close angular#52227
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close angular#52227
Re-organize code to minimize number of calls to the trackBy function. PR Close angular#52227
No description provided.