-
Notifications
You must be signed in to change notification settings - Fork 575
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
Feedback on Hermes support #3940
Comments
Great news thank you!! |
Wonderful news but as most of my development is mainly focused on Android... the waiting game continues. |
I'm also more interested on the Android side as non-hermes for iOS is quite fast and stable, but Android is the one that's slow and buggy. However, great progress, I will be giving it a try as well on my free time. What is the roadmap for Android? Does it need an entire new implementation as well, or is it the same code base with some tweaks? |
We fully understand the need to get this out on Android ASAP too and we're full-throttling into that now 🚀 To be more detailed: We have a couple of outstanding issues in the way we bootstrap the module and the ability to catch exceptions natively on Android that we have to solve for a release to be usable. The good news is that majority of the code is shared between iOS and Android and we mainly need to solve issues in code and build-scripts for the part that bootstraps our .so library on Android. |
Great news, thank you for all your hard work. We will be testing this in our next dev cycle and report back. |
Great news!!! |
I created a new application and installed it but it doesn't open the application, some Flipper log Process: realmHermes [16230] Date/Time: 2021-09-04 01:10:10.191 -0300 Time Awake Since Boot: 5600 seconds System Integrity Protection: disabled Crashed Thread: 12 com.facebook.react.JavaScript Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Termination Signal: Illegal instruction: 4 Application Specific Information: Thread 0:: Dispatch queue: com.apple.main-thread EXC_BAD_INSTRUCTION EXC_BAD_INSTRUCTION Process: realmHermes [21541] Date/Time: 2021-09-04 01:27:10.133 -0300 Time Awake Since Boot: 6600 seconds System Integrity Protection: disabled Crashed Thread: 12 com.facebook.react.JavaScript Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Termination Signal: Illegal instruction: 4 Application Specific Information: Thread 0:: Dispatch queue: com.apple.main-thread |
@joaodematejr thanks a lot for taking this for a spin! Can I get you to move this to a new issue? GitHub comments are really bad at threaded conversations ... |
@kneth Does this require a specific version of RN? I'd like to give this a try with one of our apps but that's still on 0.63.4, is that up-to-date enough? |
@liamjones Our tests are using 0.64.2, and you might have to bump to 0.64 for it to work. |
We just pre-released Please note that React Native must be at version 0.66.0-rc.3 or later .. this is very important, since JSI is not ABI stable and your app will simply crash if the version isn't correct. As an experiment, we're trying out the GitHub release discussion feature: So if you have any experiences (good or bad) with this pre-release, please share them over at #3978 |
We've released a new version of Realm JS with support for the Hermes engine: Realm JS v10.20.0-alpha.2. Please take it for a spin and provide any feedback or issues you might have using the Hermes issue template:
|
@kraenhansen Tested this extensively with a pool of users in one of my apps. No issues reported so far! |
Awesome news |
@baira thank you so much for doing that! |
Where can I find currently known issues? Is it possible to test only for Android with this version? Which one is more stable, Android or iOS? |
@kraenhansen I will be testing 10.20.0-alpha.2 on Android with Hermes over the next few days to about ~50 users. I will also be testing 10.20.0-alpha.2 on iOS, but without Hermes (as it doesn't support INTL yet and polyfills are terrible), do you know if this Realm version without Hermes may be problematic? I've noticed you got rid of GCDWebServer dependency, so I'm afraid this version may have issues if not using Hermes. |
Does rc.1 work on react-native@0.70.0-rc.4? I've spent my entire day to get it to work but I'm running into |
The import {createRealmContext} from '@realm/react';
const myRealmConfig = { schema: [Task, User, /*...*/]};
const { RealmProvider, useRealm, useObject, useQuery } = createRealmContext(myRealmConfig);
const AppWrapper = () => {
return (
<RealmProvider>
<App/>
<RealmProvider>
)
} src: https://github.com/realm/realm-js/tree/master/packages/realm-react#setting-things-up |
An update on the current status from the Realm team would be nice @kraenhansen @kneth Thank you |
Yes its been a year since they last updated. @kneth we really wanna use this in production so please guide us can we now? |
We are moving forward with JSI and Hermes. Unfortunately we are experiencing some performance regressions but our confidence is growing as we put out new prereleases of v11. Version 11.0.0 will bring more than JSI/Hermes support - we have outlined what you can expect here. |
From your outline: "We cannot promise any specific release date, only that we will release it when we and the code are ready." The writing is on the wall for me. You guys are struggling to make this happen and this does not bode well. As paying customers who have stayed with you, this is the least we can expect. Sad News for me. |
I've been following this thread for a long time. I guess a lot of people also do silently. I have many projects with realm already and everytime we start a new one, realm seems to be holding us back. |
Yes, I'm aware of this, I'm trying to migrate an existing app from 0.68.2 to 0.70.0-rc.4. I updated my dependency from realm@11.0.0-rc.0 to 11.0.0-rc.1 but the following code const { RealmProvider, useRealm, useObject, useQuery } = createRealmContext(myRealmConfig); Will fail with
Now, I'm still having trouble building on the new architecture so I was trying with |
@mordechaim can you please create a new issue for this? We haven't officially made an update for 0.70.0-rc.4. It is possible that we need to create a new release for this. Since the Hermes migration, we are hard bound to any updates to |
Hi All, Product for Realm here. As the engineering team mentioned, we have some outstanding work that we want to wrap up before moving v11 to master. Kenneth mentioned a performance regression that we uncovered and right now, that performance regression seems to be due to React Native's underlying architecture - so unfortunately, we are waiting for them to fix this issue. Once they fix this, we will need to retest to see where we are at. However, there is nothing stopping you from using our RC version in production today (perhaps your code doesn't hit the regressions at all?) Only you, as the app developer and owner, can make the call whether you are comfortable with using a release candidate in production. In fact, you already are if you are using React Native as a platform, which is pre-1.0 framework with an ever-changing and breaking API. This makes it difficult for us to keep up without making breaking changes in our version support. For an embedder such as ourselves, we've had to fight quite a bit against the framework and overwrite private APIs in order for us to even work, which is likely why you don't see many native C++ libraries that need to reflect across the bridge. We hope that the new architecture with TurboModules and Fabric will make this easier and easier in the future. I would advise you to first run all your unit and performance testing with our RC release and if this passes, along with a successful UAT - you can then make a call whether you feel comfortable releasing to the app store. All this being said, we are in contact with the React Native team, and are hopeful that fixes will come soon - I hope that we will release our v11 master before the end of the year. If there is anyone who would like to discuss their situation further I am always available for a chat and you can reach out to me at ian.ward@mongodb.com and we can setup a meeting time. |
Excited to see progress on v11! However, I'm still confused about the compatibility:
|
Yes, but we haven't decided which one yet. 0.70 is just around the corner,
With our JSI implementation, we are able to support both JSC and Hermes. When we release v11, we will try to document the advantages and disadvantages for both so you can make an informed decision.
Currently our focus is on JSI. TurboModules will be worth investigating at some point. |
Does this mean that enabling the new architecture will not be an option in the foreseeable future when depending on Realm? |
So, can I ask a straight question. I would like to use Hermes to get the benefits (faster UI load times, smaller pkg sizes etc). Will Realm ever be in a position to support Hermes on React Native. It’s not clear to me from your answer. I’m sensing that you’re saying that Hermes and Realm will never be a perfect fit. |
@martinpoulsen my question exactly, I’m not getting a clear picture |
Yes, you can do this today. |
The new architecture was designed for gradual migration. You can enable the new architecture and still have libraries that use legacy modules. The JSI is available regardless. |
We've been running realm with hermes in production on IOS the past 4 months with no real issues. We recently ran into some issues when upgrading to RN .69x but had to revert back to .68 for a few other reasons. We have kept a close eye on local db related issues since we updated to the hermes supported realm and are happy to report everything has been working great on our end. We've been using it for fairly heavy operations, often managing thousands of records at a time and haven't run into any problems at all. Thank you for your work Realm team. |
TL;DR: Update on — Hi all, I wanted to provide a bit more detail on the situation related to performance regressions referenced above and in #4443, as I've been doing a lot of research into this. To briefly summarise, in order to support Hermes we had to move from interacting with the JavaScriptCore engine (JSC) directly, to using JSI (which is an abstraction layer for working with Hermes and JSC). This meant we had to change the way we attach C++ objects to JS objects, as JSI does not support the mechanism we used previously (JSC's JSObjectSetPrivate). Unfortunately, the best method we were able to find to do this with JSI is quite a lot slower (Realm JS does not fit well with the The current situation on our We've been working with Meta to try to understand the options available to us to improve this situation, and the good news is that in React Native v0.71, a new API is being introduced for attaching C++ objects to JS objects, and our initial testing suggests that this should bring performance much closer to parity with Unfortunately, this API is not currently available when Hermes is disabled, and so we do not expect RN v0.71 to improve performance for users with Hermes disabled. We have created a proposal to implement this support in React Native. Until that happens (which cannot be guaranteed, as I imagine Meta are mainly focussed on Hermes), we would expect performance using We’ve exhausted every other avenue we can think of in trying to find a solution for this, but without support for it at the React Native level, there’s no way we can work around this (while still supporting libraries such as Reanimated), so we recommend all users migrate to Hermes, and if this performance regression is critical to your use case, to remain on Realm Thanks, |
Have there been any changes to the Realm 11.0.0-rc.2 in the last few days? The same projects with RN 0.70.1 + Realm 11.0.0-rc.2 + Hermes true are slow again. About 4 days ago it was ok. Both Android and iOS. |
@joaotmachado We don't modify versions after release. Can it be explained by a different use pattern? If so, we are interesting to hear about it as it might help us to optimise in the future. |
Yesterday we released version 11.0.0 and we now consider Hermes a fully supported JavaScript engine. I would like to thank everybody who have tried our prereleases, provided feedback and showed us patience and trust during the integration with Hermes. It has been a large effort for a small team, and we have been motivated by your support. |
Great news and thank you all for your hard work and in exercising patience whilst accepting our feedback. |
Been a long road, thanks for the great work 👍🏻 |
We are working hard on getting Hermes supported by Realm JavaScript, and we are releasing a series of pre-releases to test our progress.
We encourage you to try out the pre-release in your development environment (don't use it in production yet). Create a new issue with your observations, including details about iOS version, other JavaScript libraries. Please use the Hermes issue template.
We appreciate your feedback, but we cannot guarantee if and when we respond to your comment.
Current state
v11.0.0-rc.1
(orv11.0.0-rc.0
if you're using a React Native version between0.66.0
and0.68.2
)0.69.0
or above this is very important, since JSI is not ABI stable and your app will simply crash if the version isn't correct. Usev11.0.0-rc.0
for older versions of React Native).Installation
We are keeping the pre-releases under the tag
hermes
, and you can install the latest pre-release using the following command:For a more comprehensive list of TODOs, please see our PR and the source code for
TODO
comments.The text was updated successfully, but these errors were encountered: