Hermes Open-source JavaScript Engine

Mobile apps are getting increasingly larger, which can pose problems — particularly for devices with limited storage or processing power. This is one reason many big tech firms, including Spotify, Uber, and Facebook itself, have taken to launching “lite” versions of their apps. But what if developers could improve the performance of their main apps by using an optimized JavaScript engine that reduces the download size and boosts startup performance?

That’s what Facebook set out to do first with its own suite of apps, for which it developed the Hermes JavaScript engine, which is now available on GitHub for any developer to use.

“To increase the performance of Facebook’s apps, we have teams that continuously improve our JavaScript code and platforms,” the company wrote in a blog post. “As we analyzed performance data, we noticed that the JavaScript engine itself was a significant factor in startup performance and download size. With this data in hand, we knew we had to optimize JavaScript performance in the more constrained environments of a mobile phone compared to a desktop or laptop.”

According to Facebook, Hermes helps improve three core app attributes: time-to-interact (TTI), which is the time it takes from launching an app to when it becomes fully loaded and usable; download size (Android .APK size); and memory utilization.

It’s worth noting that Hermes only works with apps that have been built using React Native, a mobile app framework developed by Facebook and open-sourced back in 2015. React Native’s core selling point is that code can run natively on different platforms (i.e. Android and iOS), and the framework has been used by some big brand apps, including Uber Eats and Walmart.

However, React Native hasn’t always been warmly received, due to some of its downsides — specific functionality in apps still require a native code, for example, to support integration with the smartphone camera and sensors. And developers often have to create “bridges” to plug the gaps between native code and React Native. That is one of the reasons Airbnb, once an advocate for React Native, segued away from the framework last year.

But open-sourcing Hermes could be one way for Facebook to breathe new life into React Native and encourage further uptake among developers.

Given that Hermes is focused squarely on mobile apps, Facebook said it doesn’t have any plans to integrate Hermes with web browsers or server infrastructure, such as Node.js. “Existing JavaScript engines remain preferable in those environments,” the company said.

Hermes is the latest in a line of open source projects emanating from Facebook, with other recent projects including a deep learning framework called Pythia; a deep learning recommendation model called DLRM; and Spectrum, which is designed to make uploading photos more efficient.

--

--

--

Product owner Ice Regime and National Security Framework of North Pole

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Implementing Redux is tedious. But it doesn’t have to be.

Sequelize Database Migrations and Models With Nodejs

Best JavaScript ES2019 Methods that You Should Know

Desk setup.

How to Fetch Data from an API in JavaScript

Coding Laptop.

Comparison between React js and Vuejs :

How to create your own Redux

Blog Day -4

Develop your OpenSea clone script using the latest blockchain technology

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dr Francesco Dergano

Dr Francesco Dergano

Product owner Ice Regime and National Security Framework of North Pole

More from Medium

Top Javascript Frameworks

Application Framework with JavaScript

The concept of Closure in JavaScript

Javascript Error Handling