Back to News for Developers

ELI5: Hermes - Optimizing Performance in Mobile Applications

December 13, 2021ByCami Williams

Here at Meta, we have teams dedicated to continuously improving the performance of our mobile apps as we add new features and complexity. A large part of that work involves optimizing JavaScript performance in constrained mobile environments.

Hermes, a JavaScript engine built by Meta engineers, is optimized for mobile to help apps that are built in React Native start and load faster.

What is the project

Hermes was built primarily to optimize startup time for React Native apps on Android, and does this through bytecode precompilation. While most JavaScript engines will parse the JavaScript source after it is loaded, Hermes uses an ahead-of-time compiler, which runs as part of the mobile application build process to map necessary code to memory on startup, deduplicate functions, and perform various other optimizations.

Using Hermes in your project results in reduced start-up time, decreased memory usage, and an overall smaller app size.

Where is the library used at Meta

Meta open-sourced Hermes in 2019, and we use it on all of our apps built for Android mobile devices.

What resources does it have

To learn more about Hermes, visit its website, which contains documentation and a more in-depth overview of how it works. The Hermes GitHub repo contains guides and examples on how to start using the engine for your own applications.

If you have any further questions about Hermes, let us know on our YouTube channel, or by tweeting at us. We always want to hear from you and hope you will find this open-source project and the new ELI5 series useful.

About the ELI5 series

In a series of short videos (~1 min in length), one of our Developer Advocates on the Meta Open Source team explains a Meta open source project in a way that is easy to understand and use.

We will write an accompanying blog post (like the one you're reading right now) for each of these videos, which you can find on our YouTube channel.

To learn more about Meta Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.