Skip to content

Conversation

AndrewKushnir
Copy link
Contributor

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 Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added state: WIP area: core Issues related to the framework runtime target: major This PR is targeted for the next major release engine: ivy labels Apr 14, 2021
@ngbot ngbot bot modified the milestone: Backlog Apr 14, 2021
@google-cla google-cla bot added the cla: yes label 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.
@AndrewKushnir AndrewKushnir force-pushed the refactor-load-lcontext branch from f896c72 to 1aa5d1b Compare April 15, 2021 01:11
@AndrewKushnir AndrewKushnir requested a review from mhevery April 15, 2021 01:12
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate and removed state: WIP target: major This PR is targeted for the next major release labels Apr 15, 2021
@AndrewKushnir AndrewKushnir marked this pull request as ready for review April 15, 2021 01:12
@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 21, 2021
@AndrewKushnir
Copy link
Contributor Author

Presubmit.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Apr 21, 2021
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
@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 May 23, 2021
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 cla: yes target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants