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

React Native 0.62 support #42

Open
kesha-antonov opened this issue Mar 30, 2020 · 31 comments
Open

React Native 0.62 support #42

kesha-antonov opened this issue Mar 30, 2020 · 31 comments

Comments

@kesha-antonov
Copy link

Hi!
Is it planned?

@songxiaoliang
Copy link

same, Hope to support soon

@Kudo
Copy link
Owner

Kudo commented Mar 31, 2020

Thanks @enahum's help for sending #41 for upgrade.
I've published [email protected]. Please take a look.

@enahum
Copy link
Contributor

enahum commented Mar 31, 2020

Awesome @Kudo, will replace our fork with the npm package and report back here in about 10 hours ;)

@enahum
Copy link
Contributor

enahum commented Mar 31, 2020

this is working as intended with RN v0.62.0 installed from the npm package.

Thanks @Kudo for the timely PR review/merge and publishing the package

@nonewcode
Copy link
Contributor

Are there any benchmarks for this against Hermes 0.4.0?

@songxiaoliang
Copy link

@Kudo If I don't need intl, can I just install v8-android-nointl, or do I need to install both react-native-v8 and v8-android-nointl?

@ammarahm-ed
Copy link
Contributor

@songxiaoliang react-native-v8 is the base library you need that handles everything. Along with that you need v8-android or v8-android-nointl installed too.

@songxiaoliang
Copy link

@ammarahm-ed thanks, I have solved this problem through practice. anyway, Currently I am trying the difference between herms and react-native-v8

@ammarahm-ed
Copy link
Contributor

@songxiaoliang If you are creating a memory intensive application, v8 is the best choice to go, it has great garbage collection and memory usage does not peak.

@enahum
Copy link
Contributor

enahum commented Apr 8, 2020

@Kudo can you release 0.62.1 on npm? there is no needed changes on the patch, running the script is be enough (ran it locally and is all good, but I can't publish :P)

@nonewcode
Copy link
Contributor

0.62.2 now :)

@enahum
Copy link
Contributor

enahum commented Apr 8, 2020

yeah, no changes needed for 0.62.2 either

@Kudo
Copy link
Owner

Kudo commented Apr 9, 2020

Published v0.62.1-patch.0 and 0.62.2-patch.1, please let me know if there are any further questions.
(Please do not use 0.62.2-patch.0, which is incorrect version from my publish fault.)

@Kudo
Copy link
Owner

Kudo commented Apr 9, 2020

@codecog

Are there any benchmarks for this against Hermes 0.4.0?

Will find some time to do that. My recent works is about to add inspector support.
Ideally we could do direct debugging and support TurboModules like Hermes.

@Jeevan-Kishore
Copy link

@Kudo Fantastic work. We were trying to come to a decision based on stats to switch over to V8 from hermes.

Are the benchmarking's available ?

@Kudo
Copy link
Owner

Kudo commented May 20, 2020

@Jeevan-Kishore @codecog
I've just updated react-native-js-benchmark to compare JSC 230250, V8 8.0 and Hermes 0.4.1.
The result is here - https://docs.google.com/spreadsheets/d/1XB6fuk-NYZbCDikxQOAJemE-P8cfbsfdXivTeVwcwIk/edit?usp=sharing

@magrinj
Copy link

magrinj commented May 20, 2020

@Kudo Thanks for your work and the benchmark, jsc looks better than Hermes and v8 from the results ?
So using up to date jsc with this library https://github.com/react-native-community/jsc-android-should get better performances than v8 ?

@Kudo
Copy link
Owner

Kudo commented May 21, 2020

I am sorry that I had a mistake to run benchmarks yesterday. (RNV8 not updated).
I've re-examined again with some changes:

  1. Use arm64-v8a ABI to test
    • Many devices are arm64 right now.
    • V8 assumes to use less memory due to its Pointer Compression feature.
  2. Add V8 JIT variant into the benchmark result.

@magrinj It's hard to say which JS runtime is better. There were some configurations that may impact to the result.
For JSC, it has four tiers of JIT model and we disabled some of them.
For V8, by default I use the Lite Mode (JIT-less mode).
For Hermes, officially they don't have JIT.
You could see the updated Google Sheet, V8 with JIT acts 2x better than others in RenderComponentThroughput test case.

IMO, I would use V8 if apps need heavy JS computing.
Otherwise, Hermes is good enough especially its binary size is really really small.

@nonewcode
Copy link
Contributor

@Kudo is Jit activated on the android package? If not, how would i go about adding this? Appreciate the work you put in here.

@Kudo
Copy link
Owner

Kudo commented May 21, 2020

@codecog It's my fault not updated the document.
There are packages like v8-android-jit or v8-android-jit-nointl, credit from @sirpy at Kudo/v8-android-buildscripts#9
The integration is pretty much like this

I will update the document later.

@nonewcode
Copy link
Contributor

@Kudo Thanks for the direction

@gpawlik
Copy link

gpawlik commented Jun 2, 2020

Hi! I am experiencing a significant performance degradation (specially with animations) after the upgrade to [email protected] and [email protected] (from 0.61.4 and 0.61.1-patch.0 respectively). Is this something expected?

@Kudo
Copy link
Owner

Kudo commented Jun 11, 2020

@gpawlik Could you try RN 0.62.2 with JSC or Hermes?
I was curious if the degradation comes from RN.

On the other hand, please help me to double check the v8-android* version you used before and after upgrade.

@gpawlik
Copy link

gpawlik commented Jun 11, 2020

Thanks @Kudo , I have been using v8-android 7.5.1 and upgraded to 8.80.1. I have tried RN 62.2 with hermes and there was a slight improvement comparing with v8, and then tried with jsc and the performance problem has gone (app is still a little bit slower than on v8 but acceptable).

@Kudo
Copy link
Owner

Kudo commented Jun 15, 2020

@gpawlik I am sorry that getting a little confused from the description:

the performance problem has gone (app is still a little bit slower than on v8 but acceptable).

It looks like Hermes and JSC has no performance issue on RN 0.62.2 but only V8, right?

@gpawlik
Copy link

gpawlik commented Jun 15, 2020

Only JSC has no performance issues, v8 has serious issues when it comes to screen transitions, animations and any touchable interactions. The performance isn't much better on Hermes, but I haven't tried it before 0.62.2 so it is difficult to compare.

@enahum
Copy link
Contributor

enahum commented Jun 15, 2020

@gpawlik do you know what may be causing the perf degradation in your code?

In our app, we can use JSC and V8 no problem at all, but if we switch to hermes, we started to see horrible degradation as you described, but the code is so massive that we couldn’t track it down to anything specific.

@gpawlik
Copy link

gpawlik commented Jun 15, 2020

@enahum unfortunately I was not able to track down the exact cause of this degradation (similarly, our codebase is massive), but in the coming weeks I might spend more time doing this investigation so I will keep you updated.

@Kudo
Copy link
Owner

Kudo commented Jun 18, 2020

The current JSC has lightweight JIT. From my previous benchmark, the JSC has better performance than Hermes or V8 (not the v8-android-jit version).

However, performance highly depends on applications.
Do you use Animated, Animated with native driver or even Reanimated?

@gpawlik
Copy link

gpawlik commented Jun 18, 2020

Yes, I use Animated (with useNativeDriver specified), although the performance degradation happen equally on screens and components with no animations at all and with simple interactions like button tap, etc.

@afkcodes
Copy link

how should i setup in 0.61.4 @Kudo i'm not able to find similarity in build.gradle file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants