Control flow list diffing faster update#52227
Closed
pkozlowski-opensource wants to merge 5 commits intoangular:mainangular/angular:mainfrom
pkozlowski-opensource:control_flow_list_diffing_faster_updatepkozlowski-opensource/angular:control_flow_list_diffing_faster_updateCopy head branch name to clipboard
Closed
Control flow list diffing faster update#52227pkozlowski-opensource wants to merge 5 commits intoangular:mainangular/angular:mainfrom pkozlowski-opensource:control_flow_list_diffing_faster_updatepkozlowski-opensource/angular:control_flow_list_diffing_faster_updateCopy head branch name to clipboard
pkozlowski-opensource wants to merge 5 commits intoangular:mainangular/angular:mainfrom
pkozlowski-opensource:control_flow_list_diffing_faster_updatepkozlowski-opensource/angular:control_flow_list_diffing_faster_updateCopy head branch name to clipboard
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.
alxhub
approved these changes
Oct 17, 2023
| trackBy: TrackByFunction<V>): number { | ||
| if (liveIdx === newIdx && Object.is(liveValue, newValue)) { | ||
| // matching and no value identity to update | ||
| return 1; |
Member
There was a problem hiding this comment.
We can make constants for these (or a const enum) to give semantic meaning to the return values.
Member
Author
|
This PR was merged into the repository by commit 7818d5c. |
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close #52227
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close #52227
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
Re-organize code to minimize number of calls to the trackBy function. PR Close #52227
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close #52227
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close #52227
pkozlowski-opensource
added a commit
that referenced
this pull request
Oct 18, 2023
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. |
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…gular#52227) The at operation is private and doesn't have to be part of the public interface. PR Close angular#52227
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
We can speedup items comparision by having access to raw values and delay key calculation in certain conditions. PR Close angular#52227
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
…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
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
This change avoid re-creation of the LiveCollectionLContainerImpl instance every time the repeater runs (on every change detection). PR Close angular#52227
ChellappanRajan
pushed a commit
to ChellappanRajan/angular
that referenced
this pull request
Jan 23, 2024
Re-organize code to minimize number of calls to the trackBy function. PR Close angular#52227
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.