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

Avoid jump to background executor when invoking JS in bridgeless #44556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

javache
Copy link
Member

@javache javache commented May 13, 2024

Summary:
Noticed when profiling Store as Activity that every call into JS would be passed via a (default priority) background thread first. This is inefficient from a scheduling perspective. Instead use the Task's default/immediate executor to immediately execute the success callback on the current thread and avoid a thread change.

Changelog: [Internal]

Differential Revision: D57279034

@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 May 13, 2024
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,558,761 -4
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,928,761 -2
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 02d2f8c
Branch: main

…ebook#44556)

Summary:

Noticed when profiling Store as Activity that every call into JS would be passed via a (default priority) background thread first. This is inefficient from a scheduling perspective. Instead use the Task's default/immediate executor to immediately execute the success callback on the current thread and avoid a thread change.

Changelog: [Internal]

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

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

javache added a commit to javache/react-native that referenced this pull request May 14, 2024
…ebook#44556)

Summary:

Noticed when profiling Store as Activity that every call into JS would be passed via a (default priority) background thread first. This is inefficient from a scheduling perspective. Instead use the Task's default/immediate executor to immediately execute the success callback on the current thread and avoid a thread change.

Changelog: [Internal]

Differential Revision: D57279034
javache added a commit to javache/react-native that referenced this pull request May 14, 2024
…eless (facebook#44556)

Summary:

Noticed when profiling Store as Activity that every call into JS would be passed via a (default priority) background thread first. This is inefficient from a scheduling perspective. Instead use the Task's default/immediate executor to immediately execute the success callback on the current thread and avoid a thread change.

Changelog: [Internal]

Differential Revision: D57279034
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 p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants