refactor(core): replace loadLContext with getLContext calls#41606
Closed
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
Closed
refactor(core): replace loadLContext with getLContext calls#41606AndrewKushnir wants to merge 1 commit intoangular:masterfrom
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
Conversation
mgechev
approved these changes
Apr 14, 2021
alfaproject
reviewed
Apr 14, 2021
alfaproject
reviewed
Apr 14, 2021
This commit refactors the code to replace `loadLContext` with `getLContext` calls. The only difference between these two functions is that the `loadLContext` supports throwing an error in case `LContext` can not be found. The investigation performed in angular#41525 revealed that throwing while retrieving `LContext` might have undesirable performance implications, so we should avoid that to make sure there are no accidental perf regressions in other parts of code that used `loadLContext`. Moreover, in most of the places the `loadLContext` was already called in a mode that prevented an error from being thrown, so this refactoring should have no effect on the actual behavior.
f896c72 to
1aa5d1b
Compare
mhevery
approved these changes
Apr 21, 2021
Contributor
Author
jessicajaniuk
pushed a commit
that referenced
this pull request
Apr 22, 2021
This commit refactors the code to replace `loadLContext` with `getLContext` calls. The only difference between these two functions is that the `loadLContext` supports throwing an error in case `LContext` can not be found. The investigation performed in #41525 revealed that throwing while retrieving `LContext` might have undesirable performance implications, so we should avoid that to make sure there are no accidental perf regressions in other parts of code that used `loadLContext`. Moreover, in most of the places the `loadLContext` was already called in a mode that prevented an error from being thrown, so this refactoring should have no effect on the actual behavior. PR Close #41606
|
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 commit refactors the code to replace
loadLContextwithgetLContextcalls. The only difference between these two functions is that theloadLContextsupports throwing an error in caseLContextcan not be found. The investigation performed in #41525 revealed that throwing while retrievingLContextmight have undesirable performance implications, so we should avoid that to make sure there are no accidental perf regressions in other parts of code that usedloadLContext. Moreover, in most of the places theloadLContextwas already called in a mode that prevented an error from being thrown, so this refactoring should have no effect on the actual behavior.PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?