WhoBuilt

The Size of Your App Matters

Apr 16, 2024· 4 min· 1.7K views·Watch on YouTube

Speaker

Szymon Rybczak, a software engineer at Callstack, explains how enabling ProGuard can reduce Android app size in the React Native Optimization Shorts series.

Why app size matters

Rybczak says app size can affect downloads and points to charts from Twilio Segment and CleverTap. He cites a CleverTap finding that almost 19% of users uninstall apps because of limited storage.

Check the release build size

Rybczak builds a basic React Native Android app with a few native dependencies using `npx react-native build-android --mode release`. The initial app is 29 MB.

Enable release minification

In `build.gradle`, Rybczak sets `enableProguardInReleaseBuilds` to `true` and rebuilds with the same command. He reports the new build is about 2 to 2.5 MB smaller, even in this relatively new app.

Explore other size optimizations

Rybczak directs viewers to Callstack's 2024 React Native Optimization Guide for more techniques and flags. He says the guide has 23 chapters covering tips for performance issues.

Takeaways

  • Measure the release build before and after changing optimization settings.
  • For Android release builds, try enabling `enableProguardInReleaseBuilds` and check the resulting app size.
  • Treat the reported 2 to 2.5 MB reduction as an example from one small project; results depend on the app.
  • Consider storage constraints when prioritizing app size, since the cited CleverTap chart links them to uninstall decisions.

Mentioned in this talk

Search inside this talk

What was claimed 4

Related talks

The Size of Your App Matters, Szymon Rybczak · WhoBuilt