Improvements with Hermes – Metrics
Time to Interaction:
- Stock React Native: 4.30s
- Hermes React Native: 2.01s
APK Application Size
- Stock React Native: 41mb
- Hermes React Native: 22mb
- Stock React Native: 185mb
- Hermes React Native: 136mb
Will Hermes be the Default Engine in React Native?
How do I know if I can switch to Hermes?
I asked Ram to elaborate on how to know if Hermes would work for a particular application. He said the items that were not Hermes compatible would result in hard errors. Thus, an application developer can swap the engines in their Gradle file, then run through the tests, and if all passes, congratulations, your app is Hermes qualified.
Can I use Hermes on the server?
TJ asked if Hermes could be used in non-mobile contexts. Neil shared that Hermes is optimized to be fast in resource-constrained contexts like mobile. If you used Hermes in a resource-rich context, like found in a modern server, Hermes would be a less optimal choice due to the architectural tradeoffs. It would not hurt my feelings if the Chrome Browser team adopted Hermes, just for the memory footprint improvements alone. It does get annoying having 2GB consumed by Chrome on a typical day.
Hermes architecture vs. other JS Engines
React Native apps go through a defined build process. The power and resources available on a typical build machine are an order of magnitude greater than the resources available on a mobile device. Hermes moves many steps into build-time, freeing up run-time processing for other actions.
We went into a more in-depth discussion of some of these steps and how they relate to application performance. Make sure to listen to this section if you are interested in Hermes architecture and what it means for live apps.
MLH Fellowship Program participants build profiling tool.
Due to complications from COVID, most university internships this year have been canceled. The Major League Hacking group worked with Facebook and Github to match participants with open-source projects. Jessie Nguyen and Saphal Patro participated in the React Native open-source project through the Major League Hacking Fellowship program. Together, they worked on the profiling integration for Hermes and React Native. At 19:59, we discuss the MLH Program and also the work performed by Jessie and Saphal on the profiler. Their work is already in the main React Native CLI repository. It must be quite a sense of accomplishment for Jessie and Saphal to have contributed directly and visibly to one of the most popular mobile open-source projects.
Software developers can analyze their application source code’s performance at run-time by using the profiler built by Jessie and Saphal. The profiler runs inside of Chrome DevTools, a familiar place for all things debugging/profiling. The tool graphically shows the run-time behavior of discrete functions, so software developers can analyze the performance and diagnose trouble spots.
Does Hermes work better with different code styles?
Who else uses Hermes?
- Recording of Interview
- Hermes Engine Website
- Hermes GitHub
- Hermes Engine Twitter
- Hermes Profile Transformer
- Major League Hacking
- Ram – Twitter
- Jessie Nguyen – Twitter
- Saphal Patro – Twitter