Skip to content
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(common): AsyncPipe should not call markForCheck on subscription #54554

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Feb 22, 2024

This commit prevents AsyncPipe from calling markForCheck when values are synchronously emit during subscription to an observable. This prevents subscriptions to Replay observables from needlessly walking up to the root of the view tree during template execution for each new replay observable in the template.

@atscott atscott added area: common Issues related to APIs in the @angular/common package target: patch This PR is targeted for the next patch release labels Feb 22, 2024
@ngbot ngbot bot added this to the Backlog milestone Feb 22, 2024
@atscott
Copy link
Contributor Author

atscott commented Feb 22, 2024

TGP

The single failure was due to a test that incorrectly relied on this behavior and is fixed in cl/609157155

@atscott atscott requested a review from alxhub February 22, 2024 00:30
This commit prevents `AsyncPipe` from calling `markForCheck` when values
are synchronously emit during subscription to an observable. This
prevents subscriptions to `Replay` observables from needlessly walking
up to the root of the view tree during template execution for each
new replay observable in the template.
@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Feb 22, 2024
@atscott
Copy link
Contributor Author

atscott commented Feb 22, 2024

Caretaker note: Might be a good idea to merge and sync on its own or at least with very unrelated changes.

@dylhunn
Copy link
Contributor

dylhunn commented Feb 23, 2024

This PR was merged into the repository by commit 707bfc9.

@dylhunn dylhunn closed this in 707bfc9 Feb 23, 2024
dylhunn pushed a commit that referenced this pull request Feb 23, 2024
…ion (#54554)

This commit prevents `AsyncPipe` from calling `markForCheck` when values
are synchronously emit during subscription to an observable. This
prevents subscriptions to `Replay` observables from needlessly walking
up to the root of the view tree during template execution for each
new replay observable in the template.

PR Close #54554
@angular-automatic-lock-bot
Copy link

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 Mar 25, 2024
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: common Issues related to APIs in the @angular/common package merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants