Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tomekzaw
marked this pull request as ready for review
October 31, 2026 08:22
This branch has not been deployed
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:
StateWrapperImplwas created withnewObjectJavaArgs(). That's aNewObject, whose Java constructor calls back into C++ throughinitHybridto create the C++ part. Thencthis()looks that part up again to callsetState. The class is only ever created from C++ (its constructor is private), for Create andUpdateStatemount items and for preallocation.It now has a private constructor that takes the state, and those three places create it with
newObjectCxxArgs(state), likeEventEmitterWrapper. The Java class no longer hasinitHybrid. The constructor is private, withfriend HybridBase, so the public C++ API doesn't change.Changelog:
[ANDROID] [CHANGED] - Create
StateWrapperImplwithout a call back from JavaTest Plan:
A Playground screen that mounts 200
Images every 500 ms. Each image gets aStateWrapperImplwhen it is preallocated and another one for itsUpdateStateitem. Time perStateWrapperImpl(C++ timer around its creation), and per transaction:StateWrapperImpl, preallocationStateWrapperImpl,UpdateStateitemexecuteMount(C++), 200 imagesSetup:
./gradlew :packages:rn-tester:android:app:assembleRelease -PreactNativeArchitectures=arm64-v8a, R8 on) with default feature flags, compiled withcmd package compile -m speed.mainand this PR (16 processes per build).yarn cxx-api-validate(Doxygen 1.16.1): all 12 C++ API snapshots match, with no changes needed.🤖 Generated with Claude Code