Case study / 06 · Performance · App size
Taking a production app from 89 MB to 76 MB without cutting a feature
Treebo's guest app had grown heavier with every upgrade. Most of that weight was leftovers, not features, so the job was finding it and taking it out safely.
Context
A hotel booking app lives or dies on the install and the first open. A big download puts people off on slow connections and low-storage phones, and a slow cold start costs bookings.
Problem
Years of React Native upgrades had left native binaries for CPU architectures the app did not need, plus bundled images that had never been optimized. Startup also paid for screens most people never opened on launch.
Approach
- Drop what no device needs. Removed the unused native architectures from the build.
- Optimize bundled images. Recompressed and cleaned up the images shipped inside the app.
- Hermes as part of the New Architecture work. The upgrade to 0.77.2 brought Hermes along with Fabric and TurboModules.
- Pay for screens only when they are used. Lazy loading and dynamic routing kept heavy screens out of startup, and error boundaries stopped one failing screen from taking down the app.
Result
- App size down from 89 MB to 76 MB, a 15% cut.
- No feature removed to get there.
- Faster, sturdier startup from lazy loading, dynamic routing and error boundaries.
What I took from it
Before arguing about which feature to cut, look at what the build is carrying that nobody asked for. Size work is mostly housekeeping, and it is cheap compared with what it saves.