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
perf(core): optimize memory allocation when reconciling lists #52245
perf(core): optimize memory allocation when reconciling lists #52245
Conversation
cf9fa4b
to
3e1ab2c
Compare
3e1ab2c
to
1a25809
Compare
This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys.
55e824e
to
23f6cfa
Compare
@JoostK I believe I've addressed all the feedback (thnx for the review!) - could you please take another look? |
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.
Neat!
while (this.vMap.has(value)) { | ||
value = this.vMap.get(value)!; | ||
cb(value, key); | ||
const vMap = this._vMap; |
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.
nit: could possibly move this above the if
and use it in the condition as well. Only relevant for minification now, as perf should be fine without this local variable either way.
|
23f6cfa
to
48c9d54
Compare
This PR was merged into the repository by commit e3a6bf9. |
This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close #52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
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. |
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
…ar#52245) This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys. PR Close angular#52245
This change replaces the implementation of the multi-map used to store detached views while reconciling lists. The new implementation optimizes memory allocation for such map and avoid arrays allocation when there are no duplicated keys.