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
- Startup time dropped from 6 seconds to 2 seconds (67% improvement)
- APK size reduced from 28.6 MB to 19.8 MB
- Memory usage decreased from 206 MB to 141 MB during login flow
- Installation size dropped 28% (from 64.86 MB to 46.85 MB)
- Hermes requires only 3 lines of code to integrate
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.
About This Article
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.
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.
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.