Move shadow-node ref update thread tag to Fabric install#57497
Closed
javache wants to merge 1 commit into
Closed
Conversation
Summary: The runtime shadow-node reference update thread tag was being set on every `RuntimeExecutor` tick in `ReactInstance`. Because the underlying flag is `thread_local` and only meaningful on the JS runtime thread, it's enough to set it once during Fabric installation. Move the `ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThread` call into `UIManagerBinding::createAndInstallIfNeeded`, which runs on the JS thread and is guarded to execute once per runtime. This lets the `runtime` module drop its direct dependency on `renderer/core`, reducing coupling between the Bridgeless runtime host and the Fabric renderer. Behavior is unchanged: the write was already unconditional; the read at `updateMountedFlag` is still gated by the existing feature flag. Changelog: [Internal] Reviewed By: lenaic, zeyap Differential Revision: D111059967
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111059967. |
|
This pull request has been merged in 5976273. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The runtime shadow-node reference update thread tag was being set on every
RuntimeExecutortick inReactInstance. Because the underlying flag isthread_localand only meaningful on the JS runtime thread, it's enough to set it once during Fabric installation.Move the
ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThreadcall intoUIManagerBinding::createAndInstallIfNeeded, which runs on the JS thread and is guarded to execute once per runtime. This lets theruntimemodule drop its direct dependency onrenderer/core, reducing coupling between the Bridgeless runtime host and the Fabric renderer.Behavior is unchanged: the write was already unconditional; the read at
updateMountedFlagis still gated by the existing feature flag.Changelog: [Internal]
Reviewed By: lenaic, zeyap
Differential Revision: D111059967