Repository navigation
fix(ngUpgrade): prevent digest already in progress - #9054
Merged
Merged
Conversation
fix(ngUpgrade): prevent digest already in progress
Contributor
Author
Contributor
|
I have the same issue and just tried this PR. Interestingly, I have a fairly complex angular1+angular2 hybrid app and this one liner not only fixed the problem but also seems to have helped performance a lot! I guess there were a lot of digests happening in very close succession triggered by this which are now better consolidated. LGTM pls? :) 👍 |
|
This will land in rc2? It's about to be released??? pleeeeease :) |
1 of 3 tasks
1 of 3 tasks
|
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. |
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.
**This is a resubmit of #9046
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
Under certain conditions ngUpgrade will throw "digest already in progress" errors. Seems to be related to overlapping digest cycles between ngUpgrade and the Angular 1 application.
Repro here:
#8951
What is the new behavior?
By using $evalAsync, digest cycles will no longer overlap since Angular will check if a digest cycle is already in progress before triggering a new one. If a digest is already a progress the ngUpgrade update will just join the existing cycle.
Does this PR introduce a breaking change?
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: