Skip to content
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

Clear fiber.sibling field when clearing nextEffect #18970

Merged
merged 2 commits into from
May 21, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented May 21, 2020

In order to help an internal issue with leaking memory from fibers, we should clear the sibling field when we mark a fiber for deletion. We previously did this in #16820 but this caused internal errors because there are subtle use cases with the deprecated findDOMNode when we need the sibling for traversal.

Instead of clearing the sibling field at this point, we could also maybe clear it when we also clear the nextEffect. This should happen at a later time, after the findDOMNode logic has run, allowing the field to properly be cleared and the retained fiber to be GC'd.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels May 21, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 21, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit eb3dc35:

Sandbox Source
gallant-fermi-r2e3c Configuration

@sizebot
Copy link

sizebot commented May 21, 2020

Details of bundled changes.

Comparing: 22f7663...eb3dc35

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-dev.js +0.1% +0.1% 642.53 KB 642.88 KB 137.88 KB 137.97 KB RN_OSS_DEV
ReactNativeRenderer-dev.js +0.1% +0.1% 661.38 KB 661.73 KB 142.39 KB 142.48 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 0.0% 🔺+0.1% 272.03 KB 272.16 KB 46.99 KB 47.02 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% +0.1% 284.07 KB 284.21 KB 49.29 KB 49.31 KB RN_OSS_PROFILING
ReactFabric-prod.js 🔺+0.1% 🔺+0.1% 263.94 KB 264.07 KB 45.47 KB 45.5 KB RN_OSS_PROD
ReactFabric-profiling.js +0.1% 0.0% 275.96 KB 276.1 KB 47.76 KB 47.79 KB RN_OSS_PROFILING

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js 0.0% 0.0% 454.75 KB 454.89 KB 80.38 KB 80.4 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.0% 13.05 KB 13.05 KB 4.8 KB 4.8 KB NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 136.36 KB 136.36 KB 34.88 KB 34.88 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.2% 1.16 KB 1.16 KB 660 B 659 B NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 19.87 KB 19.87 KB 7.44 KB 7.44 KB UMD_PROD
ReactDOMForked-dev.js 0.0% 0.0% 1.04 MB 1.04 MB 237.73 KB 237.81 KB FB_WWW_DEV
ReactDOMForked-prod.js 0.0% 0.0% 440.87 KB 441.01 KB 79.53 KB 79.57 KB FB_WWW_PROD
react-dom.development.js 0.0% 0.0% 912.64 KB 913.01 KB 200.61 KB 200.69 KB UMD_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 451.47 KB 451.61 KB 81.28 KB 81.31 KB FB_WWW_PROFILING
react-dom.production.min.js 🔺+0.1% 0.0% 119.95 KB 120.01 KB 38.47 KB 38.49 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.1% 123.94 KB 124 KB 39.73 KB 39.76 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 957.06 KB 957.41 KB 213.81 KB 213.9 KB FB_WWW_DEV
react-dom.development.js 0.0% 0.0% 868.72 KB 869.07 KB 198.08 KB 198.16 KB NODE_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 404.87 KB 405.02 KB 74.6 KB 74.63 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% -0.0% 130.61 KB 130.61 KB 34.7 KB 34.69 KB NODE_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 120.07 KB 120.13 KB 37.57 KB 37.59 KB NODE_PROD
react-dom-test-utils.development.js 0.0% -0.0% 75.28 KB 75.28 KB 20.18 KB 20.18 KB UMD_DEV
react-dom.profiling.min.js +0.1% 0.0% 124.19 KB 124.25 KB 38.84 KB 38.85 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.0% 13.17 KB 13.17 KB 4.89 KB 4.89 KB UMD_PROD
ReactDOM-dev.js 0.0% 0.0% 1.03 MB 1.03 MB 235.45 KB 235.54 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% 0.0% 443.22 KB 443.36 KB 78.47 KB 78.49 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 70.11 KB 70.11 KB 19.68 KB 19.67 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.6 KB 5.6 KB 1.86 KB 1.86 KB NODE_DEV
react-dom-server.browser.development.js 0.0% -0.0% 129.34 KB 129.34 KB 34.44 KB 34.44 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.35 KB 5.35 KB 1.8 KB 1.8 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.19 KB 1.19 KB 698 B 697 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 4.85 KB 4.85 KB 1.7 KB 1.7 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1 KB 1 KB 610 B 608 B NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js +0.1% +0.1% 613.69 KB 614.04 KB 129.21 KB 129.29 KB FB_WWW_DEV
ReactART-prod.js 🔺+0.1% 🔺+0.1% 249.37 KB 249.51 KB 42.62 KB 42.65 KB FB_WWW_PROD
react-art.development.js +0.1% +0.1% 640.16 KB 640.53 KB 135.24 KB 135.32 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 107.56 KB 107.62 KB 32.63 KB 32.66 KB UMD_PROD
react-art.development.js +0.1% +0.1% 544.19 KB 544.54 KB 117.69 KB 117.77 KB NODE_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 72.55 KB 72.61 KB 21.8 KB 21.82 KB NODE_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactTestRenderer-dev.js +0.1% +0.1% 577.61 KB 577.96 KB 122.41 KB 122.5 KB FB_WWW_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 12.73 KB 12.73 KB 3.96 KB 3.97 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 577 KB 577.37 KB 120.45 KB 120.55 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.1% -0.0% 74.65 KB 74.71 KB 22.76 KB 22.75 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 550.16 KB 550.51 KB 119.03 KB 119.11 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 74.45 KB 74.51 KB 22.43 KB 22.45 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.1% +0.1% 597.77 KB 598.12 KB 126.92 KB 127 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% -0.0% 17.71 KB 17.71 KB 5.24 KB 5.24 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 81.48 KB 81.55 KB 24.37 KB 24.39 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.92 KB 2.92 KB 1.21 KB 1.21 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against eb3dc35

@sizebot
Copy link

sizebot commented May 21, 2020

Details of bundled changes.

Comparing: 22f7663...eb3dc35

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.development.js 0.0% -0.0% 75.29 KB 75.29 KB 20.19 KB 20.19 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.36 KB 5.36 KB 1.81 KB 1.8 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 13.18 KB 13.18 KB 4.9 KB 4.9 KB UMD_PROD
ReactDOMTesting-dev.js 0.0% 0.0% 931.26 KB 931.61 KB 208.12 KB 208.21 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.2 KB 1.2 KB 706 B 704 B UMD_PROD
react-dom.development.js 0.0% 0.0% 946.51 KB 946.88 KB 207.09 KB 207.18 KB UMD_DEV
react-dom-server.browser.development.js 0.0% -0.0% 143.86 KB 143.86 KB 36.72 KB 36.72 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 124.74 KB 124.8 KB 39.96 KB 39.98 KB UMD_PROD
ReactDOMForked-dev.js 0.0% 0.0% 1.01 MB 1.01 MB 231.9 KB 231.98 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.38 KB 20.38 KB 7.55 KB 7.54 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.1% 128.83 KB 128.9 KB 41.15 KB 41.2 KB UMD_PROFILING
ReactDOMForked-prod.js 0.0% 0.0% 429.68 KB 429.83 KB 77.65 KB 77.68 KB FB_WWW_PROD
react-dom.development.js 0.0% 0.0% 901.14 KB 901.5 KB 204.52 KB 204.6 KB NODE_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 440.22 KB 440.36 KB 79.4 KB 79.42 KB FB_WWW_PROFILING
react-dom.production.min.js 🔺+0.1% 0.0% 124.92 KB 124.98 KB 39.02 KB 39.04 KB NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 20.3 KB 20.3 KB 7.52 KB 7.52 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 129.18 KB 129.24 KB 40.36 KB 40.37 KB NODE_PROFILING
ReactDOM-dev.js 0.0% 0.0% 1.01 MB 1.01 MB 229.75 KB 229.84 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% 0.0% 432.15 KB 432.29 KB 76.61 KB 76.64 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 443.62 KB 443.76 KB 78.53 KB 78.55 KB FB_WWW_PROFILING
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.61 KB 5.61 KB 1.87 KB 1.86 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.4% 1.17 KB 1.17 KB 669 B 666 B NODE_PROD
ReactDOMTesting-prod.js 0.0% 0.0% 393.01 KB 393.16 KB 72.69 KB 72.72 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 70.12 KB 70.12 KB 19.68 KB 19.68 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 4.87 KB 4.87 KB 1.71 KB 1.7 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 13.06 KB 13.06 KB 4.81 KB 4.81 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.02 KB 1.02 KB 618 B 616 B NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.1% +0.1% 664.55 KB 664.92 KB 140.15 KB 140.23 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 110.92 KB 110.98 KB 33.59 KB 33.63 KB UMD_PROD
react-art.development.js +0.1% +0.1% 567.58 KB 567.93 KB 122.63 KB 122.71 KB NODE_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 75.87 KB 75.93 KB 22.8 KB 22.82 KB NODE_PROD
ReactART-dev.js +0.1% +0.1% 603.67 KB 604.02 KB 127.18 KB 127.26 KB FB_WWW_DEV
ReactART-prod.js 🔺+0.1% 🔺+0.1% 242.33 KB 242.47 KB 41.38 KB 41.41 KB FB_WWW_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 12.74 KB 12.74 KB 3.97 KB 3.97 KB UMD_PROD
ReactTestRenderer-dev.js +0.1% +0.1% 577.62 KB 577.97 KB 122.42 KB 122.51 KB FB_WWW_DEV
react-test-renderer.development.js +0.1% +0.1% 577.03 KB 577.4 KB 120.46 KB 120.56 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.1% -0.0% 74.67 KB 74.74 KB 22.78 KB 22.77 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 550.18 KB 550.53 KB 119.04 KB 119.12 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 74.47 KB 74.54 KB 22.44 KB 22.46 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.1% +0.1% 623.54 KB 623.89 KB 132.36 KB 132.44 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 85.22 KB 85.29 KB 25.45 KB 25.48 KB NODE_PROD
react-reconciler-reflection.development.js 0.0% -0.0% 17.72 KB 17.72 KB 5.24 KB 5.24 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.93 KB 2.93 KB 1.22 KB 1.21 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-prod.js 🔺+0.1% 🔺+0.1% 263.95 KB 264.08 KB 45.48 KB 45.51 KB RN_OSS_PROD
ReactFabric-profiling.js +0.1% 0.0% 275.97 KB 276.11 KB 47.77 KB 47.8 KB RN_OSS_PROFILING
ReactNativeRenderer-prod.js 0.0% 🔺+0.1% 272.04 KB 272.17 KB 46.99 KB 47.03 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% +0.1% 284.08 KB 284.22 KB 49.29 KB 49.32 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.1% +0.1% 665.87 KB 666.22 KB 143.07 KB 143.16 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% 🔺+0.1% 272 KB 272.13 KB 46.98 KB 47.01 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% +0.1% 284.04 KB 284.18 KB 49.27 KB 49.3 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 642.54 KB 642.89 KB 137.88 KB 137.97 KB RN_OSS_DEV
ReactFabric-dev.js +0.1% +0.1% 647.02 KB 647.38 KB 138.56 KB 138.64 KB RN_FB_DEV
ReactFabric-prod.js 🔺+0.1% 🔺+0.1% 263.91 KB 264.05 KB 45.46 KB 45.49 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 661.39 KB 661.75 KB 142.4 KB 142.48 KB RN_OSS_DEV
ReactFabric-profiling.js +0.1% 0.0% 275.93 KB 276.07 KB 47.75 KB 47.78 KB RN_FB_PROFILING

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against eb3dc35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants