-
Notifications
You must be signed in to change notification settings - Fork 26.5k
refactor(ivy): don't create TNodes for native projectable nodes #28275
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
refactor(ivy): don't create TNodes for native projectable nodes #28275
Conversation
The legacy test failure looks legit! We are now adding an |
78b3726
to
037e7e3
Compare
Before this commit we were creating a "fake" TNode for each and every projectable node passed during dynamic component creation. This approach had several problems: - the existing TView structure had to be mutated to accomodate new TNodes and it was very easy to "corrupt" TView / TNode data structures; - TNodes are not really needed to fully support projectable nodes so we were creating objects and updating existing data structures for nothing. This commit changes the approach so we don't create "fake" TNodes for projectable nodes but instead we process projectable nodes directly in the projection instruction. As a result we've got less code, less object allocation and - as a bonus - we fix few bugs where TView / TNode data structures were corrupted when using projectable nodes.
62971f5
to
aa0a135
Compare
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
@petebacondarwin I think the test failure you mentioned has been fixed. Can you take another look? |
@kara yep, the error @petebacondarwin mentioned was present only in the WIP version of this PR. So all is good here. |
merge-assistance: global approval, since the test failure has been fixed and the only changes in upgrade are to turn on the tests. |
…8275) Before this commit we were creating a "fake" TNode for each and every projectable node passed during dynamic component creation. This approach had several problems: - the existing TView structure had to be mutated to accomodate new TNodes and it was very easy to "corrupt" TView / TNode data structures; - TNodes are not really needed to fully support projectable nodes so we were creating objects and updating existing data structures for nothing. This commit changes the approach so we don't create "fake" TNodes for projectable nodes but instead we process projectable nodes directly in the projection instruction. As a result we've got less code, less object allocation and - as a bonus - we fix few bugs where TView / TNode data structures were corrupted when using projectable nodes. PR Close angular#28275
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. |
Before this commit we were creating a "fake" TNode for each and every
projectable node passed during dynamic component creation. This approach
had several problems:
it was very easy to "corrupt" TView / TNode data structures;
creating objects and updating existing data structures for nothing.
This commit changes the approach so we don't create "fake" TNodes for projectable
nodes but instead we process projectable nodes directly in the projection instruction.
As a result we've got less code, less object allocation and - as a bonus - we fix few
bugs where TView / TNode data structures were corrupted when using projectable nodes.
NOTE A REVIEWER: there is still one remaining test marked with FW-873 - this is because the root cause is different to the one fixed in this PR (LView / TView corruption by TNodes created for projectable nodes). I've investigated the other root cause and I know what is going on plus I think I know how to fix it. But the fix is not trivial so it will be done in a separate PR.