Skip to content

List reconciliation#51980

Closed
pkozlowski-opensource wants to merge 2 commits intoangular:mainfrom
pkozlowski-opensource:list_reconciliation_clean
Closed

List reconciliation#51980
pkozlowski-opensource wants to merge 2 commits intoangular:mainfrom
pkozlowski-opensource:list_reconciliation_clean

Conversation

@pkozlowski-opensource
Copy link
Copy Markdown
Member

@pkozlowski-opensource pkozlowski-opensource commented Oct 2, 2023

No description provided.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 2, 2023
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I think this type of algorithm is a really good case for descriptive comments - what state are we in? What just happened? What needs to happen next? etc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see a way of combining these algorithms to lower the code size here.

The fundamental observation is to note that lines 98-134 are the only place we need random (tail) access to the collection. Otherwise, we're only ever looking at the "next" item and could go through an iterator if needed.

I don't think we need to do this refactoring before landing this change, but we should talk about it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Will try different refactorings here but it would be great if we can do it post feature freeze. Let's chat / pair.

The new list reconcilation algorithm, an alternative to
the DefaultIterableListDiffer. It works by performing updates
in place instead of creating intermediate data describing changes
to apply. For lists expressed as an Array it performs additional
optimizations for the moves and swap scenarios.

The new list diffing approach is meant to be used in the new control
flow and should me much faster as compared to the ngFor with the
DefaultIterableListDiffer.
This commit plugs the new list reconciliation into the new built-in repeater.
@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime core: control flow Issues related to the built-in control flow (@if, @for, @switch) labels Oct 3, 2023
@ngbot ngbot bot modified the milestone: Backlog Oct 3, 2023
@pkozlowski-opensource pkozlowski-opensource marked this pull request as ready for review October 3, 2023 12:28
@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 3, 2023
@alxhub alxhub added the target: minor This PR is targeted for the next minor release label Oct 4, 2023
@alxhub
Copy link
Copy Markdown
Member

alxhub commented Oct 4, 2023

This PR was merged into the repository by commit 7d42dc3.

@alxhub alxhub closed this in 4f04d1c Oct 4, 2023
alxhub pushed a commit that referenced this pull request Oct 4, 2023
…51980)

This commit plugs the new list reconciliation into the new built-in repeater.

PR Close #51980
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 4, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
The new list reconcilation algorithm, an alternative to
the DefaultIterableListDiffer. It works by performing updates
in place instead of creating intermediate data describing changes
to apply. For lists expressed as an Array it performs additional
optimizations for the moves and swap scenarios.

The new list diffing approach is meant to be used in the new control
flow and should me much faster as compared to the ngFor with the
DefaultIterableListDiffer.

PR Close angular#51980
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ngular#51980)

This commit plugs the new list reconciliation into the new built-in repeater.

PR Close angular#51980
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime core: control flow Issues related to the built-in control flow (@if, @for, @switch) detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants