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

[Events] Adds existing event system behind enablePluginEventSystem flag #15840

Closed

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jun 7, 2019

Note: this PR should make no changes to existing logic anywhere. Everything should continue to work as it does today. Also we don't expect to turn this flag of for the long foreseeable future.

This PR takes the existing event system call-sites and modules and wraps them in a enablePluginEventSystem flag. With this flag in place we can understand internally what parts of our application code use what events parts of the heritage event system. This flag also allows us to track metrics on code size of React Flare vs the heritage event system, as code size is important for us to manage.

This PR also renames the existing React Flare event flag to something more descriptive - enableResponderEventSystem.

@sizebot
Copy link

sizebot commented Jun 7, 2019

ReactDOM: size: 🔺+0.2%, gzip: 🔺+0.4%

Details of bundled changes.

Comparing: def56c9...a86a2a5

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js +0.2% +0.3% 109.24 KB 109.47 KB 34.7 KB 34.8 KB NODE_PROFILING
react-dom-unstable-native-dependencies.development.js +4.4% +6.4% 60.76 KB 63.41 KB 15.85 KB 16.86 KB UMD_DEV
ReactDOM-dev.js +0.8% +0.4% 884.54 KB 891.24 KB 196.98 KB 197.86 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.production.min.js 🔺+0.2% 🔺+0.4% 10.69 KB 10.71 KB 3.67 KB 3.68 KB UMD_PROD
ReactDOMServer-dev.js 0.0% +0.1% 135.5 KB 135.56 KB 34.81 KB 34.83 KB FB_WWW_DEV
react-dom-unstable-fire.development.js +0.7% +0.5% 865.05 KB 870.9 KB 197.15 KB 198.04 KB UMD_DEV
react-dom-unstable-fire.production.min.js 🔺+0.2% 0.0% 105.92 KB 106.18 KB 34.45 KB 34.46 KB UMD_PROD
ReactTestUtils-dev.js +1.5% +0.5% 53.33 KB 54.13 KB 14.33 KB 14.4 KB FB_WWW_DEV
react-dom-unstable-fire.profiling.min.js +0.2% +0.2% 109.07 KB 109.33 KB 35.41 KB 35.49 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.7% +0.5% 859.4 KB 865.26 KB 195.58 KB 196.46 KB NODE_DEV
react-dom-server.node.development.js +0.1% +0.2% 135.35 KB 135.51 KB 35.85 KB 35.92 KB NODE_DEV
react-dom-unstable-fire.production.min.js 🔺+0.2% 🔺+0.4% 105.92 KB 106.15 KB 33.86 KB 33.98 KB NODE_PROD
react-dom.development.js +0.7% +0.5% 864.7 KB 870.69 KB 197.01 KB 197.92 KB UMD_DEV
react-dom-unstable-fire.profiling.min.js +0.2% +0.3% 109.25 KB 109.49 KB 34.71 KB 34.81 KB NODE_PROFILING
react-dom-server.browser.development.js +0.1% +0.2% 137.28 KB 137.44 KB 36.24 KB 36.31 KB UMD_DEV
react-dom.production.min.js 🔺+0.2% 0.0% 105.91 KB 106.16 KB 34.44 KB 34.45 KB UMD_PROD
ReactFire-dev.js +0.7% +0.4% 883.75 KB 890.32 KB 196.9 KB 197.74 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.2 KB 19.2 KB 7.23 KB 7.22 KB UMD_PROD
react-dom.profiling.min.js +0.2% +0.2% 109.06 KB 109.31 KB 35.4 KB 35.48 KB UMD_PROFILING
ReactFire-prod.js 🔺+0.4% 🔺+0.3% 346.21 KB 347.49 KB 63.67 KB 63.88 KB FB_WWW_PROD
react-dom.development.js +0.7% +0.5% 859.06 KB 865.05 KB 195.44 KB 196.34 KB NODE_DEV
ReactFire-profiling.js +0.4% +0.3% 351.49 KB 352.77 KB 64.56 KB 64.76 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.1% +0.2% 133.41 KB 133.57 KB 35.3 KB 35.37 KB NODE_DEV
react-dom.production.min.js 🔺+0.2% 🔺+0.4% 105.9 KB 106.14 KB 33.85 KB 33.98 KB NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 19.12 KB 19.12 KB 7.22 KB 7.22 KB NODE_PROD
ReactDOM-prod.js 🔺+0.4% 🔺+0.3% 358.23 KB 359.52 KB 66.16 KB 66.36 KB FB_WWW_PROD
ReactDOMServer-prod.js 0.0% -0.0% 47.93 KB 47.93 KB 11.03 KB 11.03 KB FB_WWW_PROD
ReactDOM-profiling.js +0.4% +0.3% 363.47 KB 364.76 KB 67.05 KB 67.25 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js +4.4% +6.4% 60.43 KB 63.08 KB 15.72 KB 16.73 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.88 KB 3.88 KB 1.51 KB 1.51 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 🔺+0.1% 🔺+0.3% 10.43 KB 10.44 KB 3.56 KB 3.57 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.1 KB 1.1 KB 667 B 666 B NODE_PROD
react-dom-test-utils.development.js +1.3% +0.8% 57.64 KB 58.39 KB 15.85 KB 15.98 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.81 KB 3.81 KB 1.54 KB 1.53 KB UMD_DEV
react-dom-test-utils.production.min.js 🔺+0.3% 🔺+0.3% 10.81 KB 10.84 KB 3.97 KB 3.99 KB UMD_PROD
ReactDOMUnstableNativeDependencies-dev.js +2.8% +2.8% 58.9 KB 60.57 KB 14.9 KB 15.32 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.21 KB 1.21 KB 706 B 705 B UMD_PROD
ReactDOMUnstableNativeDependencies-prod.js 🔺+0.2% 🔺+0.5% 26.14 KB 26.2 KB 5.25 KB 5.28 KB FB_WWW_PROD
react-dom-test-utils.development.js +1.3% +1.0% 55.98 KB 56.73 KB 15.53 KB 15.68 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.64 KB 3.64 KB 1.49 KB 1.49 KB NODE_DEV
react-dom-test-utils.production.min.js 🔺+0.2% 🔺+0.2% 10.56 KB 10.58 KB 3.92 KB 3.93 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 637 B 636 B NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-dev.js +0.1% +0.1% 658.93 KB 659.92 KB 140.04 KB 140.21 KB RN_FB_DEV
ReactFabric-prod.js 0.0% 0.0% 245.4 KB 245.48 KB 42.51 KB 42.53 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 670.06 KB 671.04 KB 142.67 KB 142.83 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% 0.0% 253.56 KB 253.64 KB 44.08 KB 44.1 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js 0.0% 🔺+0.1% 252.62 KB 252.69 KB 43.7 KB 43.72 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% +0.1% 260.75 KB 260.83 KB 45.33 KB 45.36 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.1% +0.1% 670.15 KB 671.14 KB 142.72 KB 142.88 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% 0.0% 252.61 KB 252.69 KB 43.71 KB 43.72 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% 0.0% 260.74 KB 260.82 KB 45.34 KB 45.36 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 658.83 KB 659.82 KB 140.01 KB 140.16 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% 🔺+0.1% 245.4 KB 245.48 KB 42.5 KB 42.53 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% +0.1% 253.56 KB 253.64 KB 44.07 KB 44.1 KB RN_OSS_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js 0.0% 0.0% 535.83 KB 536.02 KB 112.18 KB 112.21 KB FB_WWW_DEV
react-art.development.js 0.0% +0.1% 594.65 KB 594.95 KB 130.42 KB 130.49 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 97.11 KB 97.11 KB 29.91 KB 29.91 KB UMD_PROD
react-art.development.js +0.1% +0.1% 525.56 KB 525.85 KB 112.94 KB 113.02 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 62.09 KB 62.09 KB 19.19 KB 19.19 KB NODE_PROD
ReactART-prod.js 0.0% -0.0% 202.95 KB 202.95 KB 34.56 KB 34.56 KB FB_WWW_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js +0.7% +0.9% 19.22 KB 19.37 KB 6.16 KB 6.21 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.51 KB 2.51 KB 1.11 KB 1.11 KB NODE_PROD
react-reconciler-persistent.development.js 0.0% 0.0% 521.12 KB 521.31 KB 110.35 KB 110.38 KB NODE_DEV
react-reconciler.development.js +0.1% +0.1% 523.61 KB 523.91 KB 111.42 KB 111.5 KB NODE_DEV
react-reconciler.production.min.js 0.0% -0.0% 63.26 KB 63.26 KB 19 KB 19 KB NODE_PROD

Generated by 🚫 dangerJS

@trueadm
Copy link
Contributor Author

trueadm commented Jun 7, 2019

I need to look into why the sizes have gone up. It's likely something with GCC and the fact there are now flags there that weren't there before. @sebmarkbage any ideas, I think you ran into something similar in the past where inlining changed because of flags? Every time I run the build I get a slightly different size with sizebot too it seems.

@necolas
Copy link
Contributor

necolas commented Dec 17, 2019

Closing as we're no longer developing this API. See #15257 (comment)

@necolas necolas closed this Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants