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

JSI support #3815

Closed
Frans-L opened this issue Jun 23, 2021 · 1 comment
Closed

JSI support #3815

Frans-L opened this issue Jun 23, 2021 · 1 comment
Assignees

Comments

@Frans-L
Copy link

Frans-L commented Jun 23, 2021

JSI is one of the coming/new features of React Native.

Basically, JSI removes the bridge between JS and the Native side. The latest react native versions (e.g. 0.65) have "already" some JSI support. There are a couple of new libraries that are already using JSI and they are over 10x faster than their counterparts: e.g. react-native-mmkv and react-native-quick-sqlite. However, Realm-JS seems to already call JavaScriptCore APIs directly, so JSI might not make so much difference.

it seems like there are at least some planning about JSI in the Hermes PR draft: #3792.

Are there some official plans to start using JSI? Would JSI make Realm faster or is it needed just for Hermes support?

In other words, can we anticipate better perfomance in the future? 😀

@Frans-L Frans-L changed the title JSI support [Feature Request] Does Realm use JSI? Jun 23, 2021
@Frans-L Frans-L changed the title Does Realm use JSI? JSI support ? Jun 23, 2021
@Frans-L Frans-L changed the title JSI support ? JSI support Jun 23, 2021
@kraenhansen kraenhansen self-assigned this Jun 24, 2021
@kraenhansen
Copy link
Member

We plan to support JavaScriptCore through our JSI implementation and remove our current direct implementation towards JavaScriptCore, primarily because it means less code to maintain. To my knowledge the primary performance benefits of JSI is related to the limited work the Hermes engine has to do on start-up and the lazy loading nature of turbo modules. Realm never used the RCT bridge since our API needed an ability to make synchronous operations when calling our C++ from JS.

Going forward Realm JS will only support debugging through the Safari dev-tools when running on JavaScriptCore or Flipper / Chrome dev-tools when running on Hermes. We expect this to significantly improve the debugging experience as we can finally ditch our current "RPC" debugging solution, which has proven slow to the point of rendering apps unusable while debugging. Removing the support of the legacy Remote JS debugging via Chrome, seem to be the direction taken by other libraries in the community and we're looking forward to enable our community to use the far superior debugging experience that Flipper brings 🚀

As such I'll close this issue, please follow our progress on #3792.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants