Stories
Slash Boxes
Comments

SoylentNews is people

Submission Preview

Link to Story

Facebook Open-sources Hermes JavaScript Engine to Improve React Native Android App Performance

Accepted submission by upstart at 2019-07-13 18:36:32
/dev/random

████ This a robot sub and needs a many editing, ████

Submitted via IRC for AnonymousLuser

Facebook open-sources Hermes JavaScript engine to improve React Native Android app performance [venturebeat.com]

Facebook is continuing its open-sourcing spree with the launch of a new JavaScript engine designed to improve the performance of big apps on Android devices, the company announced today at the Chain React conference [infinite.red] in Portland, Oregon.

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 [venturebeat.com], Uber [uber.com], and Facebook itself, [google.com] 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 [hermesengine.dev] JavaScript engine, which is now available on GitHub [github.com] 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.

Here you can see some of the improvements it made with Mattermost [mattermost.com] (an open source Slack alternative) running on a Google Pixel phone, with the TTI down more than 2 seconds, the file-size down 19 MB, and the memory utilization down by 49 MB.

React

It’s worth noting that Hermes only works with apps that have been built using React Native [github.io], a mobile app framework developed by Facebook and open-sourced back in 2015 [venturebeat.com]. 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 [uber.com] and Walmart [medium.com].

However, React Native hasn’t always been warmly received, due to some of its downsides — specific functionality in apps still require 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 [medium.com] 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 [venturebeat.com] emanating from Facebook, with other recent projects including a deep learning framework called Pythia [venturebeat.com]; a deep learning recommendation model called DLRM [venturebeat.com]; and Spectrum, which is designed to make uploading photos [venturebeat.com] more efficient.


Original Submission