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 rarely used bridge module optimization #39457

Closed
wants to merge 1 commit into from

Conversation

philIip
Copy link
Contributor

@philIip philIip commented Sep 14, 2023

Summary:

Changelog

[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is WebSocketModule. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for WebSocketModule, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 14, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

philIip added a commit to philIip/react-native that referenced this pull request Sep 14, 2023
Summary:

## Changelog
[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is `WebSocketModule`. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for `WebSocketModule`, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251
philIip added a commit to philIip/react-native that referenced this pull request Sep 14, 2023
Summary:

## Changelog
[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is `WebSocketModule`. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for `WebSocketModule`, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

philIip added a commit to philIip/react-native that referenced this pull request Sep 14, 2023
Summary:

## Changelog
[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is `WebSocketModule`. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for `WebSocketModule`, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

philIip added a commit to philIip/react-native that referenced this pull request Sep 14, 2023
Summary:

## Changelog
[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is `WebSocketModule`. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for `WebSocketModule`, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

Summary:

## Changelog
[Android][General] - hasConstants in ReactModuleInfo does nothing now

we can get rid of this. currently, the default value of hasConstants true, and the only library setting this value to false is `WebSocketModule`. this value is only read in bridge mode - it is an optimization that will not initialize the constants dictionary for native modules in bridge.

however, we have plenty of native modules that don't provide constants that have not set this flag, so this is only turned on for `WebSocketModule`, which is probably not moving anything significant.

i would recommend we get rid of this to simplify the ReactModuleInfo deprecation plan.

Reviewed By: cortinico

Differential Revision: D49210251
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49210251

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,329,224 +317
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,567,939 -347
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 88e19c0
Branch: main

@github-actions
Copy link

github-actions bot commented Sep 14, 2023

Warnings
⚠️ One hour and a half have passed and the E2E jobs haven't finished yet.

Generated by 🚫 dangerJS against f5cb95b

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 15, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 691bd0f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants