forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Multiple subscribers to ApplicationRef.isStable should all…
… see values (angular#53541) The behavior of `ApplicationRef.isStable` changed in 16.1 due to angular@28c68f7. This change added a `share` to the `isStable` observable, which prevents additional subscribers from getting a value until a new one emits. One solution to the problem would be `shareReplay(1)`. However, that would increase the bundle size since we do not use `shareReplay` elsewhere. Instead, we don't even really need to share the observable. The `Observable` available in `ApplicationRef.isStable` before the above commit was the zone stable observable, without a `share`. The new behavior adds only an additional observable to the stream, `hasPendingTasks` (a `BehaviorSubject`). The observables in this stream are not expensive to subscribe to. The only one with side effects is the `isStable` (because it subscribes to onStable), but that one already has the `share` operator on it. Omitting the `share` in `ApplicationRef` also means that applications on `zoneless` will not have to pay the cost of the operator when we make zones optional because the zone stable observable is the only place we use it. PR Close angular#53541
- Loading branch information
Showing
13 changed files
with
10 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1406,9 +1406,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1478,9 +1478,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1178,9 +1178,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2336,9 +2336,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1649,9 +1649,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1625,9 +1625,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -932,9 +932,6 @@ | |
{ | ||
"name": "setUpAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1280,9 +1280,6 @@ | |
{ | ||
"name": "setUpAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1970,9 +1970,6 @@ | |
{ | ||
"name": "shallowEqual" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1031,9 +1031,6 @@ | |
{ | ||
"name": "setUpAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1418,9 +1418,6 @@ | |
{ | ||
"name": "setupStaticAttributes" | ||
}, | ||
{ | ||
"name": "share" | ||
}, | ||
{ | ||
"name": "shareSubjectFactory" | ||
}, | ||
|