Instawork Divyanshu Maithani Jun 14, 2022

Boost Android Performance Using Hermes

Article Summary

Instawork's Android app was taking 5-6 seconds to start while iOS clocked in at just 1.5 seconds. That performance gap was killing their user experience on low-to-mid range devices.

The Instawork engineering team tackled their React Native Android performance problem by upgrading from v0.59 to v0.61 and switching from JavaScriptCore to the Hermes JavaScript engine. This case study breaks down their migration process and the impressive results.

Key Takeaways

Critical Insight

Switching to Hermes engine cut Android startup time by two-thirds while reducing memory footprint and app size, bringing Android performance in line with iOS.

The team also integrated automated performance monitoring into their QA process on Browserstack to catch future regressions before they ship.

About This Article

Problem

After upgrading to React Native v0.59, Instawork's Android app started having performance issues. The team had to fix deprecated modules, handle breaking API changes, and work through extensive test failures in both unit and integration tests.

Solution

The team upgraded to React Native v0.61.4 using the upgrade helper tool. They fixed native dependency configurations and podfiles, manually linked modules that had too many breaking changes, and resolved Flow and linting errors before rolling out Hermes.

Impact

Browserstack automation integration let the team monitor CPU and memory usage continuously across different app flows. This made it possible to catch performance regressions early and verify that improvements actually worked during QA.