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

Wire up configuration to use microtasks in RuntimeScheduler, Hermes and React #41090

Closed
wants to merge 3 commits into from

Conversation

rubennorte
Copy link
Contributor

@rubennorte rubennorte commented Oct 19, 2023

Summary:
This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Differential Revision: D50177355

See react-native-community/discussions-and-proposals#744

@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. p: Facebook Partner: Facebook Partner labels Oct 19, 2023
@facebook-github-bot
Copy link
Contributor

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50177355
rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50177355
@analysis-bot
Copy link

analysis-bot commented Oct 23, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,657,346 +8,184
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,039,004 +8,167
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 79d620d
Branch: main

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request Oct 23, 2023
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

…dule version (facebook#41082)

Summary:

We're testing a method to access `ReactNativeConfig` without a dependency on native modules, so we can access it before that infra is initialized in places like Hermes or RuntimeScheduler.

When we're in that variant, this passes the configuration to Hermes so we can use it to set flags in the runtime (like enabling microtasks in D50177355).

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50450488
Summary:

Adds support for executing microtasks in `RuntimeScheduler`, the same way we did in `JSIExecutor` before (removed in D49536251 / facebook#40870) but now after each actual task in the scheduler.

When we use microtasks in the scheduler, we ignore calls to execute expired tasks (which was used to call "React Native microtasks" that we had before). Those should now be regular microtasks in the runtime.

This is gated behind a feature flag until we've tested this broadly.

This is going to be tested in Hermes but we need to add support for microtasks in JSC (which has a no-op in its JSI interface).

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D49536262
…nd React (facebook#41090)

Summary:

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

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

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

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

This pull request has been merged in 1923a4e.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Oct 30, 2023
…nd React (facebook#41090)

Summary:
Pull Request resolved: facebook#41090

This propagates to enable the use of microtasks in the React reconciler, Runtime Scheduler and Hermes.

Changelog: [internal]

Reviewed By: sammy-SC

Differential Revision: D50177355

fbshipit-source-id: 6cf23cf72b63d19f50453d3e4cc4ac1b056dbd92
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