Detach sibling pointers in old child list#21041
Closed
acdlite wants to merge 1 commit intofacebook:masterfrom
Closed
Detach sibling pointers in old child list#21041acdlite wants to merge 1 commit intofacebook:masterfrom
acdlite wants to merge 1 commit intofacebook:masterfrom
Conversation
When a fiber is deleted, it's still part of the previous (alternate) parent fiber's list of children. Because children are a linked list, an earlier sibling that's still alive will be connected to the deleted fiber via its alternate: live fiber --alternate--> previous live fiber --sibling--> deleted fiber We can't disconnect `alternate` on nodes that haven't been deleted yet, but we can disconnect the `sibling` and `child` pointers. Will use this feature flag to test the memory impact.
|
Comparing: 6d3ecb7...8066dbe Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
3aa7ea5 to
8066dbe
Compare
Contributor
|
Here's one the leak report were look at that seem to point at this problem: We have an attached FiberNode, with it's attached alternate ref, but the sibling ref points to a FiberNode that's been unmounted. We will investigate if this code cleans up this case. |
Contributor
|
I'm able to confirm that the above mentioned leak is fixed by this PR. The drop in memory doesn't appear to be large however, but that would need further testing. This PR is promising, we should try it! |
Collaborator
Author
|
Closed by #21039 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When a fiber is deleted, it's still part of the previous (alternate) parent fiber's list of children. Because children are a linked list, an earlier sibling that's still alive will be connected to the deleted fiber via its
alternate:We can't disconnect
alternateon nodes that haven't been deleted yet, but we can disconnect thesiblingandchildpointers.Will use this feature flag to test the memory impact.