-
Notifications
You must be signed in to change notification settings - Fork 25k
feat: optimize Hermes for speed rather than size in Android #50805
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
Conversation
|
We've profiled a production release of these changes on our application and haven't seen statistically significant performance improvements with this release flag change. |
Were you able to profile against |
|
I'll try and repeat the experiment for 0.78 - which is only 85 commits behind of master of hermes, that might be more representative of the latest state of hermes. The hermes version that we are using was about ~1500 commits behind master :| |
Also @cipolleschi just pointed out how Android and iOS are actually aligned: react-native/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh Lines 77 to 83 in 1fb04e2
|
|
Good call out, I was looking at upstream hermes - I actually wasn't aware that react native shipped a copy of these upstream definitely has |
Yeah the React Native ones are the relevant one as we're the integrator of Hermes in this particular instance |
Summary:
The
Releaseflag is being used for iOS but interestingly, on Android it is optimized for size.I haven't done any performance testing but from my experience within our react native application, we have noticed that Hermes on iOS devices generally runs much faster than comparable Android devices.
We'll be conducting performance testing on our hermes fork & inside our own application soon but I don't have numbers yet.
LTO was also recently enabled in #50529 which may also affect performance which makes estimating the isolated performance impact of this PR alone a bit more complicated.
Size changes:
hermes-release.aar/jni/{arch}/libhermes.soChangelog:
[ANDROID] [CHANGED] - build hermes release version optimized for speed rather than size
Test Plan: