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

Remove usage of PossiblyWeakSet from createEventHandle #19686

Merged
merged 1 commit into from Aug 24, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Aug 24, 2020

As mentioned by @gaearon in #19174 (comment):

Does this mean we leak memory on IE11? It looks like we always add targets to this Set, but it's never cleared (since it's assumed to be a WeakSet in modern browsers).

This is correct. To avoid this memory leak, we can avoid usage of WeakSet entirely and instead use a property on the target itself, which should allow for the target to be garbage collected properly.

@sizebot
Copy link

sizebot commented Aug 24, 2020

Details of bundled changes.

Comparing: d2e914a...90a42a7

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOMForked-prod.js 🔺+0.1% 🔺+0.1% 379.61 KB 379.99 KB 70.12 KB 70.18 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 138.59 KB 138.59 KB 36.59 KB 36.6 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 124.35 KB 124.35 KB 39.9 KB 39.91 KB NODE_PROD
ReactDOMForked-profiling.js +0.1% +0.1% 392.99 KB 393.36 KB 72.59 KB 72.66 KB FB_WWW_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 924.03 KB 924.47 KB 207.64 KB 207.7 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 61.1 KB 61.1 KB 17.75 KB 17.75 KB NODE_DEV
ReactDOMTesting-prod.js 🔺+0.1% 🔺+0.1% 380.76 KB 381.13 KB 71.53 KB 71.59 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 5.52 KB 5.52 KB 1.84 KB 1.84 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 5.25 KB 5.25 KB 1.78 KB 1.78 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.17 KB 1.17 KB 667 B 668 B NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.22 KB 1.22 KB 712 B 713 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.78 KB 4.78 KB 1.68 KB 1.68 KB NODE_DEV
react-dom.development.js 0.0% 0.0% 963.36 KB 963.36 KB 210.68 KB 210.68 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 124.25 KB 124.25 KB 40.67 KB 40.67 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 129.51 KB 129.51 KB 42.3 KB 42.3 KB UMD_PROFILING
ReactDOMForked-dev.js 0.0% 0.0% 963.75 KB 964.2 KB 214.11 KB 214.18 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 129.8 KB 129.8 KB 41.53 KB 41.53 KB NODE_PROFILING
ReactDOM-dev.js 0.0% 0.0% 962.98 KB 963.42 KB 214.72 KB 214.78 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.1% 🔺+0.1% 379.15 KB 379.53 KB 69.9 KB 69.96 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% 0.0% 137.32 KB 137.32 KB 36.34 KB 36.34 KB NODE_DEV
ReactDOM-profiling.js +0.1% +0.1% 392.23 KB 392.61 KB 72.28 KB 72.35 KB FB_WWW_PROFILING
ReactDOMServer-dev.js 0.0% 0.0% 141.5 KB 141.5 KB 36.29 KB 36.29 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 66.1 KB 66.1 KB 18.24 KB 18.24 KB UMD_DEV

Size changes (experimental)

Generated by 🚫 dangerJS against 90a42a7

@sizebot
Copy link

sizebot commented Aug 24, 2020

Details of bundled changes.

Comparing: d2e914a...90a42a7

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js 0.0% -0.0% 881.27 KB 881.27 KB 201.58 KB 201.57 KB NODE_DEV
ReactDOMForked-prod.js 🔺+0.1% 🔺+0.1% 390.78 KB 391.15 KB 71.84 KB 71.91 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% -0.0% 137.08 KB 137.08 KB 36.38 KB 36.38 KB NODE_DEV
ReactDOMForked-profiling.js +0.1% +0.1% 404.2 KB 404.58 KB 74.31 KB 74.38 KB FB_WWW_PROFILING
react-dom-server.node.production.min.js 0.0% -0.0% 20.2 KB 20.2 KB 7.58 KB 7.58 KB NODE_PROD
ReactDOMTesting-dev.js 0.0% 0.0% 952.11 KB 952.56 KB 213.14 KB 213.21 KB FB_WWW_DEV
ReactDOMTesting-prod.js 🔺+0.1% 🔺+0.1% 393.4 KB 393.78 KB 73.6 KB 73.67 KB FB_WWW_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 12.67 KB 12.67 KB 4.96 KB 4.96 KB NODE_PROD
react-dom.development.js 0.0% -0.0% 925.84 KB 925.84 KB 204.04 KB 204.04 KB UMD_DEV
react-dom.profiling.min.js 0.0% 0.0% 123.59 KB 123.59 KB 40.48 KB 40.48 KB UMD_PROFILING
ReactDOMForked-dev.js 0.0% 0.0% 989.27 KB 989.72 KB 218.89 KB 218.96 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.88 KB 19.88 KB 7.46 KB 7.46 KB UMD_PROD
ReactDOM-dev.js 0.0% 0.0% 988.5 KB 988.94 KB 219.44 KB 219.51 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.1% 🔺+0.1% 390.31 KB 390.69 KB 71.58 KB 71.65 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% -0.0% 135.81 KB 135.81 KB 36.13 KB 36.13 KB NODE_DEV
ReactDOM-profiling.js +0.1% +0.1% 403.44 KB 403.82 KB 74 KB 74.06 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% -0.0% 19.78 KB 19.78 KB 7.42 KB 7.42 KB NODE_PROD
ReactDOMServer-dev.js 0.0% -0.0% 145.53 KB 145.53 KB 37.3 KB 37.3 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% -0.0% 47.3 KB 47.3 KB 11.04 KB 11.03 KB FB_WWW_PROD

Size changes (stable)

Generated by 🚫 dangerJS against 90a42a7

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

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 90a42a7:

Sandbox Source
React Configuration

@trueadm trueadm merged commit 8c9fc4e into facebook:master Aug 24, 2020
@trueadm trueadm deleted the avoid-ie11-mem-leak branch August 24, 2020 15:10
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.

None yet

4 participants