-
Notifications
You must be signed in to change notification settings - Fork 69
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
[0.71][Android] Native method performance are slow #179
Comments
Result of Turbo Native Module (Debug mode)Hermes:
RNV8:
Ref: |
hi @jhen0409, thanks for the issue with great repro example. originally i thought this was a regression issue of [email protected], but after downgrading to previous v8, the performance is almost the same. after far as i can tell, it comes from the loop calls: https://github.com/jhen0409/rnv8-issue-179/blob/071f0b053c3f151ac5c9b9a4253ff4e0ec9b6f79/android/app/src/main/java/com/testv8nativebridge/TestModule.java#L33-L35. it might not be a v8 issue but my implementation inside react-native-v8. i tried to remove locks but still not as good as hermes. i'll keep investigate if i could find something to improve. |
Hi @Kudo, I've found some issue on RNV8, it is very likely that there is a performance issue on the native bridge.
I've write a demo project here, basically it runs 10 times of native call and do simple loop in native module, it shows some notable differences in Hermes vs RNV8:
Hermes enabled
RNV8 enabled
It's ~80ms vs ~40ms on Release mode.
I found this problem on my project, it caused 20ms ~ 100ms delay on each native bridge call.
Also, I've found it have the same issue with JSC, not sure if this issue can be improved here.
The text was updated successfully, but these errors were encountered: