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

introduce logic for shared native module queue #41042

Closed
wants to merge 1 commit into from

Conversation

philIip
Copy link
Contributor

@philIip philIip commented Oct 18, 2023

Summary:
Changelog: [Internal]

currently, each native module creates a new module queue if methodQueue is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:

  • parity with android's queue model
  • performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
  • set us up to remove the assocs from the module to the method queue, which will allow us to deprecate synthesize methodQueue and -(dispatch_queue_t)moduleQueue API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Differential Revision: D50398635

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

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

@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Oct 18, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,649,173 -4
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,026,715 +2
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 28d7ade
Branch: main

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

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

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

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

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

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Reviewed By: cipolleschi

Differential Revision: D50398635
philIip added a commit to philIip/react-native that referenced this pull request Oct 20, 2023
Summary:

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Reviewed By: cipolleschi

Differential Revision: D50398635
@philIip philIip force-pushed the export-D50398635 branch 2 times, most recently from aeaef60 to 7a60c0b Compare October 20, 2023 20:18
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

Summary:

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Reviewed By: cipolleschi

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

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

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

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Reviewed By: cipolleschi

Differential Revision: D50398635
@github-actions
Copy link

This pull request was successfully merged by @philIip in a337fca.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Oct 21, 2023
Othinn pushed a commit to Othinn/react-native that referenced this pull request Oct 30, 2023
Summary:
Pull Request resolved: facebook#41042

Changelog: [Internal]

currently, each native module creates a new module queue if `methodQueue` is not overridden in the native module.

we want to see if we can use a single execution queue for a few reasons:
- parity with android's queue model
- performance: creating so many queues... for what? the overhead of this feels like it exceeds any potential benefit
- set us up to remove the assocs from the module to the method queue, which will allow us to deprecate `synthesize methodQueue` and `-(dispatch_queue_t)moduleQueue` API.

in this QE, we just start with replacing the KVO assoc'd queue with the shared module queue.

Reviewed By: cipolleschi

Differential Revision: D50398635

fbshipit-source-id: 0b194a5ae5269e843c7c537a973ee1d345ce1df4
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