-
Notifications
You must be signed in to change notification settings - Fork 584
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
WIP using JSI's NativeState class for faster access to native C++ object when Hermes enabled #4871
base: main
Are you sure you want to change the base?
Conversation
@kraenhansen @RedBeard0531 I wanted to open this WIP to start a discussion around supporting the new NativeState API in Hermes master, which provides a way to store a C++ object on a JSI object and allows us to have much faster access to the native object when Hermes is enabled. It is not currently in an RN release, so the build will fail (you need to build RN from source to make it work). It seems to work (just running the performance tests) but I am sure I'll have missed something as this stuff is complex! The main gotcha here is that the NativeState API is not implemented for the JSCRuntime and instead throws a Another gotcha is this will tie us to a minimum of whatever RN version includes this API. Not sure if that is an issue or if there's a good way to work around that if so. |
d2a8bcb
to
af59f26
Compare
OK adding the try/catch makes this like 20x slower with JSC (compared to just having the "catch" code there), lol, I guess that won't fly... maybe we could store a class static Any better ideas @RedBeard0531? |
I pushed a rough version of what I described above but I'll leave the comment intact in case the history gets confusing! 2a8cceb |
bd551c6
to
bb8ce55
Compare
2a8cceb
to
29de2d4
Compare
7674954
to
916ea33
Compare
3195ee2
to
7d6db31
Compare
What, How & Why?
This closes # ???
☑️ ToDos
Compatibility
label is updated or copied from previous entrypackage.json
s (if updating internal packages)Breaking
label has been applied or is not necessaryIf this PR adds or changes public API's: