Skip to content

Remove debugRenderPhaseSideEffects flag #17270

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

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Nov 4, 2019

There are two similar flags, debugRenderPhaseSideEffects and debugRenderPhaseSideEffectsForStrictMode. The strict mode one is the only one that is actually used. I think originally the theory is that we would one day turn it on for all components, even outside strict mode. But what we'll do instead is migrate everyone to strict mode.

The only place debugRenderPhaseSideEffects was being used was in an internal test file. I rewrote those tests to use public APIs.

There are two similar flags, `debugRenderPhaseSideEffects` and
`debugRenderPhaseSideEffectsForStrictMode`. The strict mode one is the
only one that is actually used. I think originally the theory is that
we would one day turn it on for all components, even outside strict
mode. But what we'll do instead is migrate everyone to strict mode.

The only place `debugRenderPhaseSideEffects` was being used was in
an internal test file. I rewrote those tests to use public APIs.
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a nice cleanup.

@sizebot
Copy link

sizebot commented Nov 4, 2019

Size changes (experimental)

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

Details of bundled changes.

Comparing: 6dc2734...b3007a0

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-prod.js -0.0% -0.1% 268.89 KB 268.85 KB 45.93 KB 45.9 KB RN_FB_PROD
ReactNativeRenderer-dev.js -0.1% -0.0% 748.5 KB 748.12 KB 158.27 KB 158.23 KB RN_OSS_DEV
ReactFabric-profiling.js -0.0% -0.1% 279.02 KB 278.98 KB 47.8 KB 47.77 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js -0.0% -0.1% 277.2 KB 277.16 KB 47.35 KB 47.32 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.0% -0.1% 286.16 KB 286.12 KB 49.08 KB 49.04 KB RN_FB_PROFILING
ReactFabric-dev.js -0.0% -0.0% 753.99 KB 753.61 KB 159.11 KB 159.07 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% -0.0% 268.89 KB 268.89 KB 45.91 KB 45.91 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% -0.0% 279.02 KB 279.02 KB 47.79 KB 47.79 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.1% -0.0% 754.16 KB 753.77 KB 159.19 KB 159.15 KB RN_FB_DEV
ReactNativeRenderer-profiling.js 0.0% -0.0% 286.17 KB 286.17 KB 49.06 KB 49.06 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js -0.1% -0.0% 748.66 KB 748.27 KB 158.36 KB 158.32 KB RN_FB_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.0% -0.0% 617.95 KB 617.66 KB 131.56 KB 131.55 KB UMD_DEV
react-test-renderer.production.min.js 0.0% -0.0% 71.74 KB 71.74 KB 21.89 KB 21.89 KB UMD_PROD
ReactTestRenderer-dev.js -0.1% -0.0% 628.81 KB 628.44 KB 130.73 KB 130.69 KB FB_WWW_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.62 KB 11.62 KB 3.58 KB 3.58 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% 0.0% 33.09 KB 33.09 KB 8.54 KB 8.54 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.75 KB 11.75 KB 3.68 KB 3.68 KB NODE_PROD
react-test-renderer.development.js -0.0% -0.0% 613.21 KB 612.93 KB 130.38 KB 130.36 KB NODE_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% -0.0% 123.54 KB 123.54 KB 38.79 KB 38.79 KB NODE_PROFILING
react-dom-server.browser.development.js -0.1% -0.2% 140.37 KB 140.2 KB 36.87 KB 36.81 KB UMD_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% -0.0% 5.15 KB 5.15 KB 2.01 KB 2.01 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.39 KB 20.39 KB 7.48 KB 7.48 KB UMD_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.1% 1.71 KB 1.71 KB 978 B 977 B UMD_PROD
react-dom-test-utils.development.js -0.3% -0.4% 56.27 KB 56.1 KB 15.58 KB 15.52 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.88 KB 3.88 KB 1.55 KB 1.55 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 11.18 KB 11.18 KB 4.15 KB 4.15 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.21 KB 1.21 KB 711 B 710 B UMD_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.1% 1.71 KB 1.71 KB 973 B 972 B UMD_PROD
ReactDOMServer-dev.js -0.1% -0.0% 139.64 KB 139.57 KB 35.41 KB 35.4 KB FB_WWW_DEV
react-dom-test-utils.development.js -0.3% -0.4% 54.54 KB 54.37 KB 15.25 KB 15.18 KB NODE_DEV
ReactDOMServer-prod.js 0.0% -0.0% 48.79 KB 48.79 KB 11.13 KB 11.13 KB FB_WWW_PROD
react-dom-unstable-flight-client.development.js 0.0% -0.1% 4.77 KB 4.77 KB 1.88 KB 1.88 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.95 KB 10.95 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 642 B 641 B NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.2% 1.47 KB 1.47 KB 845 B 843 B NODE_PROD
react-dom.development.js -0.0% -0.0% 951.45 KB 950.99 KB 215.02 KB 214.95 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.57 KB 119.57 KB 38.35 KB 38.35 KB UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 123.25 KB 123.25 KB 39.45 KB 39.45 KB UMD_PROFILING
react-dom.development.js -0.0% -0.0% 945.55 KB 945.1 KB 213.43 KB 213.36 KB NODE_DEV
react-dom-server.node.development.js -0.1% -0.2% 137.41 KB 137.24 KB 36.09 KB 36.03 KB NODE_DEV
react-dom-unstable-flight-server.node.development.js 0.0% -0.1% 5.12 KB 5.12 KB 1.92 KB 1.92 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 20.72 KB 20.72 KB 7.61 KB 7.61 KB NODE_PROD
react-dom-unstable-flight-server.node.production.min.js 0.0% -0.1% 1.55 KB 1.55 KB 876 B 875 B NODE_PROD
ReactTestUtils-dev.js -0.1% -0.1% 51.35 KB 51.28 KB 13.94 KB 13.93 KB FB_WWW_DEV
react-dom-server.browser.development.js -0.1% -0.2% 136.3 KB 136.13 KB 35.87 KB 35.81 KB NODE_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% -0.1% 4.85 KB 4.85 KB 1.89 KB 1.89 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.31 KB 20.31 KB 7.46 KB 7.46 KB NODE_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.1% 1.48 KB 1.48 KB 850 B 849 B NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.14 KB 60.14 KB 15.8 KB 15.8 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.73 KB 10.73 KB 3.67 KB 3.67 KB UMD_PROD
ReactDOM-dev.js -0.0% -0.0% 973.77 KB 973.36 KB 215.92 KB 215.89 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 59.82 KB 59.82 KB 15.67 KB 15.66 KB NODE_DEV
ReactDOM-profiling.js 0.0% -0.0% 402.33 KB 402.33 KB 73.42 KB 73.42 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.48 KB 10.48 KB 3.58 KB 3.57 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.12 KB 1.12 KB 676 B 675 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.0% 617.27 KB 616.86 KB 128.18 KB 128.14 KB FB_WWW_DEV
ReactART-prod.js 0.0% -0.0% 235.88 KB 235.88 KB 39.62 KB 39.62 KB FB_WWW_PROD
react-art.development.js -0.1% -0.1% 673.14 KB 672.69 KB 145.92 KB 145.83 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 106.73 KB 106.73 KB 32.35 KB 32.35 KB UMD_PROD
react-art.development.js -0.1% -0.1% 603.81 KB 603.35 KB 128.53 KB 128.46 KB NODE_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-persistent.development.js -0.0% -0.0% 602.22 KB 601.94 KB 126.59 KB 126.58 KB NODE_DEV
react-reconciler-reflection.development.js -0.9% -1.0% 19.16 KB 18.98 KB 6.25 KB 6.2 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% -0.0% 72.49 KB 72.49 KB 21.33 KB 21.33 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.86 KB 2.86 KB 1.24 KB 1.24 KB NODE_PROD
react-reconciler.development.js -0.1% -0.1% 604.82 KB 604.37 KB 127.7 KB 127.63 KB NODE_DEV

Generated by 🚫 dangerJS against b3007a0

@sizebot
Copy link

sizebot commented Nov 4, 2019

Size changes (stable)

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

Details of bundled changes.

Comparing: 6dc2734...b3007a0

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.46 KB 10.46 KB 3.57 KB 3.57 KB NODE_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.1% 1.46 KB 1.46 KB 841 B 840 B NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.1% 1.69 KB 1.69 KB 966 B 965 B UMD_PROD
react-dom-server.browser.development.js -0.1% -0.2% 136.28 KB 136.1 KB 35.86 KB 35.81 KB NODE_DEV
react-dom-unstable-flight-server.node.development.js 0.0% -0.1% 5.1 KB 5.1 KB 1.91 KB 1.91 KB NODE_DEV
react-dom.development.js -0.0% -0.0% 951.42 KB 950.97 KB 215 KB 214.92 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 19.85 KB 19.85 KB 7.38 KB 7.38 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.87 KB 3.87 KB 1.54 KB 1.54 KB UMD_DEV
react-dom-unstable-flight-server.node.production.min.js 0.0% -0.1% 1.53 KB 1.53 KB 867 B 866 B NODE_PROD
react-dom.production.min.js 0.0% -0.0% 116.16 KB 116.16 KB 37.43 KB 37.43 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.2 KB 1.2 KB 703 B 702 B UMD_PROD
react-dom.profiling.min.js 0.0% -0.0% 119.73 KB 119.73 KB 38.49 KB 38.49 KB UMD_PROFILING
react-dom.development.js -0.0% -0.0% 945.53 KB 945.08 KB 213.41 KB 213.34 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 116.3 KB 116.3 KB 36.79 KB 36.79 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.13 KB 60.13 KB 15.79 KB 15.79 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.04 KB 1.04 KB 634 B 633 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.72 KB 10.72 KB 3.67 KB 3.67 KB UMD_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% -0.1% 1.7 KB 1.7 KB 970 B 969 B UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 59.8 KB 59.8 KB 15.66 KB 15.66 KB NODE_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% -0.1% 4.84 KB 4.84 KB 1.89 KB 1.88 KB NODE_DEV
react-dom-server.node.development.js -0.1% -0.2% 137.39 KB 137.21 KB 36.09 KB 36.03 KB NODE_DEV
react-dom-unstable-flight-client.development.js 0.0% -0.1% 4.76 KB 4.76 KB 1.87 KB 1.87 KB NODE_DEV
react-dom-test-utils.development.js -0.3% -0.4% 56.26 KB 56.08 KB 15.57 KB 15.51 KB UMD_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 20.26 KB 20.26 KB 7.53 KB 7.53 KB NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% -0.1% 1.46 KB 1.46 KB 836 B 835 B NODE_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 11.17 KB 11.17 KB 4.14 KB 4.14 KB UMD_PROD
react-dom-test-utils.development.js -0.3% -0.4% 54.53 KB 54.36 KB 15.24 KB 15.18 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.96 KB 3.96 KB 1.52 KB 1.52 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.94 KB 10.94 KB 4.08 KB 4.08 KB NODE_PROD
react-dom-server.browser.development.js -0.1% -0.2% 140.35 KB 140.17 KB 36.87 KB 36.81 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.11 KB 1.11 KB 668 B 667 B NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 19.93 KB 19.93 KB 7.39 KB 7.38 KB UMD_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% 673.12 KB 672.66 KB 145.91 KB 145.83 KB UMD_DEV
react-art.production.min.js 0.0% -0.0% 104.65 KB 104.65 KB 31.83 KB 31.83 KB UMD_PROD
react-art.development.js -0.1% -0.1% 603.79 KB 603.33 KB 128.52 KB 128.45 KB NODE_DEV
react-art.production.min.js 0.0% -0.0% 69.7 KB 69.7 KB 21.02 KB 21.02 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.1% -0.0% 748.65 KB 748.26 KB 158.35 KB 158.31 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.0% -0.1% 277.19 KB 277.15 KB 47.34 KB 47.31 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.0% -0.1% 286.14 KB 286.1 KB 49.07 KB 49.03 KB RN_FB_PROFILING
ReactFabric-dev.js -0.1% -0.0% 754.14 KB 753.75 KB 159.18 KB 159.14 KB RN_FB_DEV
ReactFabric-prod.js -0.0% -0.1% 268.88 KB 268.84 KB 45.92 KB 45.89 KB RN_FB_PROD
ReactFabric-profiling.js -0.0% -0.1% 279.01 KB 278.97 KB 47.79 KB 47.76 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js -0.1% -0.0% 748.48 KB 748.11 KB 158.27 KB 158.23 KB RN_OSS_DEV
ReactNativeRenderer-profiling.js 0.0% -0.0% 286.15 KB 286.15 KB 49.06 KB 49.05 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.0% -0.0% 753.97 KB 753.6 KB 159.11 KB 159.06 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% -0.0% 268.87 KB 268.87 KB 45.91 KB 45.9 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% -0.0% 279.01 KB 279.01 KB 47.79 KB 47.78 KB RN_OSS_PROFILING

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.85 KB 2.85 KB 1.24 KB 1.24 KB NODE_PROD
react-reconciler-persistent.development.js -0.0% -0.0% 602.21 KB 601.93 KB 126.59 KB 126.57 KB NODE_DEV
react-reconciler.development.js -0.1% -0.1% 604.81 KB 604.35 KB 127.7 KB 127.63 KB NODE_DEV
react-reconciler-reflection.development.js -0.9% -1.0% 19.14 KB 18.97 KB 6.25 KB 6.19 KB NODE_DEV

Generated by 🚫 dangerJS against b3007a0

@acdlite acdlite force-pushed the remove-feature-flag branch from c1ad939 to b3007a0 Compare November 4, 2019 21:29
@acdlite acdlite merged commit 0f3838a into facebook:master Nov 4, 2019
@elicwhite
Copy link
Member

Should this callsite have been update too? Or is it different? https://github.com/facebook/react/blob/master/scripts/rollup/shims/react-native/ReactFeatureFlags.js

It looks like there are still three callsites of debugRenderPhaseSideEffects in the react repo

aungkoman pushed a commit to ReactJSMyanmar/react that referenced this pull request Dec 28, 2023
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.

5 participants