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(compiler): avoid copying from prototype while cloning an object #31638
Closed
AndrewKushnir
wants to merge
2
commits into
angular:master
from
AndrewKushnir:FW-1462_output_ast_clone_fix
Closed
perf(compiler): avoid copying from prototype while cloning an object #31638
AndrewKushnir
wants to merge
2
commits into
angular:master
from
AndrewKushnir:FW-1462_output_ast_clone_fix
Conversation
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
AndrewKushnir
added
action: review
The PR is still awaiting reviews from at least one requested reviewer
refactoring
Issue that involves refactoring or code-cleanup
target: patch
This PR is targeted for the next patch release
area: compiler
Issues related to `ngc`, Angular's template compiler
labels
Jul 18, 2019
tebbi
reviewed
Jul 19, 2019
This commit updates the `_clone` function of the `_ApplySourceSpanTransformer` class, where the for-in loop was used, resulting in copying from prototype to own properties, thus consuming more memory. Prior to NodeJS 12 (V8 versions before 7.4) there was an optimization that was improving the situation and since that logic was removed in favor of other optimizations, the situation with memory consumption caused by the for-in loop got worse. This commit adds a check to make sure we copy only own properties over to cloned object. Closes angular#31627.
AndrewKushnir
force-pushed
the
FW-1462_output_ast_clone_fix
branch
from
July 19, 2019 23:28
1c1e55f
to
7f3d1e0
Compare
AndrewKushnir
added
the
action: presubmit
The PR is in need of a google3 presubmit
label
Jul 23, 2019
alxhub
approved these changes
Jul 23, 2019
AndrewKushnir
removed
the
action: review
The PR is still awaiting reviews from at least one requested reviewer
label
Jul 23, 2019
kara
approved these changes
Jul 23, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Jul 23, 2019
kara
pushed a commit
that referenced
this pull request
Jul 23, 2019
…31638) This commit updates the `_clone` function of the `_ApplySourceSpanTransformer` class, where the for-in loop was used, resulting in copying from prototype to own properties, thus consuming more memory. Prior to NodeJS 12 (V8 versions before 7.4) there was an optimization that was improving the situation and since that logic was removed in favor of other optimizations, the situation with memory consumption caused by the for-in loop got worse. This commit adds a check to make sure we copy only own properties over to cloned object. Closes #31627. PR Close #31638
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…ngular#31638) This commit updates the `_clone` function of the `_ApplySourceSpanTransformer` class, where the for-in loop was used, resulting in copying from prototype to own properties, thus consuming more memory. Prior to NodeJS 12 (V8 versions before 7.4) there was an optimization that was improving the situation and since that logic was removed in favor of other optimizations, the situation with memory consumption caused by the for-in loop got worse. This commit adds a check to make sure we copy only own properties over to cloned object. Closes angular#31627. PR Close angular#31638
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. |
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: compiler
Issues related to `ngc`, Angular's template compiler
cla: yes
refactoring
Issue that involves refactoring or code-cleanup
target: patch
This PR is targeted for the next patch release
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 updates the
_clone
function of the_ApplySourceSpanTransformer
class, where the for-in loop was used, resulting in copying from prototype to own properties, thus consuming more memory. Prior to NodeJS 12 (V8 versions before 7.4) there was an optimization that was improving the situation and since that logic was removed in favor of other optimizations, the situation with memory consumption caused by the for-in loop got worse. This commit adds a check to make sure we copy only own properties over to cloned object.Closes #31627.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?