Accessing shared value from C++ #6899
wcandillon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In React Native Skia, we heavily on Reanimated for many things. Reanimated is an optional dependency in Skia but it's with Reanimated that the magic happens.
We recently rewrote completely on scene graph and we are quite happy with it.
The current scene graph is written in JS and can have Reanimated shared values as properties.
Now we wrote a C++ version of it which is slightly faster but not that much faster. In the C++ version we access the value of the shared value via JSI (
sharedValue.asObject(runtime).getProperty(runtime, "value")
). It's definitely faster but we think it could be way faster.There could be a way to remove JSI completely out of the equation: get a shared value as an host object invoke a function that would return the value of the shared value. There is a slight challenge with this approach: we don't statically link against reanimated, ideally, we could just copy a simple header in our code that would allow to use this API.
Let me know if that request makes sense and if you have any thoughts on it.
Beta Was this translation helpful? Give feedback.
All reactions