Let’s first chat a bit about JS engines in general.
But what if that optimization could be done during build time? That’s where Hermes comes in.
With Hermes, there is no JIT compiler. Instead, the compilation and optimization of the JS code happens when the APK is built and an optimized bytecode is included as a resource in your APK instead of a minified JS code. This has various benefits including decreasing launch time since the bytecode is ready to be executed. It also allows for considerations of more complex and time-consuming optimizations since the compilation process no longer affects the end-user.
So, once we upgraded to RN 61 and enabled Hermes, we were ecstatic to see the Mattermost Android app launch within 3 seconds as opposed to about 7 without Hermes. You can see a demo of this presented during the Chain React 2019 here. Unfortunately, after further use of our app we experienced very noticeable lag when scrolling the channel list, opening or closing the sidebars, and switching channels. Sadly, the app was unusable so we shipped Mobile App v1.26 without Hermes enabled.
The bugs in Hermes that seemed to be the cause of these issues have since been fixed and we have a JIRA ticket to plan to build the latest Hermes, package it with RN, and test to see if we can ship Mobile App v1.28 with Hermes enabled. Stay tuned!