Grab, Southeast Asia’s leading superapp, has successfully tackled major performance bottlenecks in its decade-old mobile application, achieving dramatic improvements in app size, startup times, and stability. Operating across eight countries with a single platform that integrates deliveries, mobility, and financial services, the engineering team managed a massive codebase comprising over 10 million lines of code and hundreds of third-party libraries. Faced with growing technical hurdles—including escalating Application Not Responding (ANR) rates, a continuously expanding app download size, and creeping cold start delays—the team deployed a comprehensive optimization strategy. By implementing R8 optimizations, refining keep rules, and introducing Baseline Profiles and Startup Profiles, Grab reduced its user-perceived ANR rate by roughly 32.5%, shrank its app download size by approximately 30.4%, and accelerated cold start times by 35%. Eliminating Post-Release ANR Spikes for a Smoother User Experience Prior to the overhaul, Grab’s engineering workflow encountered predictable performance hurdles following new software rollouts. Every weekly app release regularly triggered spikes in cold start delays and ANR incidents. These disruptions were primarily driven by the heavy overhead of reading numerous DEX files during the initial application launch phase. Read Also: Tinder Boosts Android App Performance and Cuts Cold Starts by 47% Using the New R8 Configuration Analyzer Google Play Expands Subscription Platform with Flexible Monetization Models and Advanced Retention Tools While standard optimization offerings like Google Play’s Cloud Profiles provided baseline improvements for typical user flows across the general population, they fell short of covering all initialization paths essential for Grab’s complex operations. Critical user journeys, such as the initialization of Dagger dependency graphs during app launch, required deeper optimization. For code paths omitted from standard distributions, user devices traditionally relied on Just-In-Time (JIT) compilation and local background optimization over the course of several days following an install. To bridge this gap, Grab implemented custom Baseline Profiles and Startup Profiles, effectively feeding critical user journey data directly into Google Play’s Cloud Profiles. This expansion ensured that vital execution paths were compiled into machine code immediately upon installation. "हम consistently experienced ANR rate spikes with every weekly app release," noted Nguyen Van Minh, Lead Software Engineer on Grab’s Passenger App Core team, highlighting the operational challenge that prompted the performance initiative. By combining profile-guided optimization with the R8 optimizer, Grab achieved an immediate 12% cold start improvement from R8 alone, alongside another 15% boost from Baseline Profiles. Together, these measures delivered a 27% faster startup time and effectively neutralized post-release ANR spikes. The broader optimization rollout was executed across three deliberate phases: adopting R8 optimization in compatibility mode, transitioning to R8 Full Mode, and refining keep rules with configuration analysis paired with continuous integration governance. Phase 1: Enabling R8 Optimization In the initial stage of the technical modernization, Grab moved away from legacy default Proguard files and adopted proguard-android-optimize.txt to activate R8 optimizations. Because the superapp’s codebase had evolved over a decade and surpassed 10 million lines of code, enabling the optimizer required a meticulous cleanup of legacy configurations and reflection patterns. To maximize early returns, Grab shipped the R8 Compat mode update alongside comprehensive Baseline Profiles and Startup Profiles. This synchronized effort generated an immediate 25% drop in user-perceived ANR rates, a 16% reduction in app download size, and a 27% improvement in cold start execution times. Phase 2: R8 Full Mode and Migration Building on the success of the initial rollout, Grab advanced the application into R8 Full Mode roughly nine months later. This transition unlocked deeper optimization capabilities across the architecture. While mainstream libraries such as Retrofit, Firebase, and Jetpack Compose integrated smoothly with R8 via their built-in rules, migrating the remainder of the massive codebase required resolving complex, reflection-heavy code paths. To achieve a seamless migration to R8 Full Mode, the team adopted consumer keep rules from the latest Gson releases to guarantee reliable JSON parsing. They also addressed optimization obstacles tied to Java dynamic proxies, which utilize runtime reflection to generate interface implementations dynamically. Because traditional compilation tools cannot detect runtime reflection usage, R8 risks stripping or renaming essential classes, which can lead to application crashes. Rather than applying broad, indiscriminate exceptions that would increase app bloat, Grab isolated the specific classes relying on reflection and established highly targeted keep rules to safeguard both application stability and optimization efficiency. Ultimately, R8 Full Mode produced compounding gains, delivering an additional 14% reduction in app download size, an extra 10% improvement in startup speed, and a further 10% decrease in user-perceived ANRs. These enhancements significantly elevated the codebase’s structural efficiency. Phase 3: Keep-Rule Refinement and Long-Term Governance In the final phase of the optimization roadmap, Grab shifted its focus toward securing long-term codebase health, establishing continuous performance monitoring, and enforcing strict compilation governance. To systematically evaluate rule hygiene and prevent configuration regressions during ongoing development cycles, the engineering team integrated the R8 Configuration Analyzer into their evaluation workflow. This diagnostic tool provides deep visibility into how effectively keep rules allow R8 to optimize, shrink, and obfuscate the application. By methodically trimming legacy keep rules on top of R8 Full Mode, Grab secured an additional 3.6% reduction in download size. More importantly, tracking these diagnostic metrics provided the engineering organization with the objective data required to implement automated pre-merge CI guardrails. These guardrails ensure that newly introduced code complies with strict keep-rule standards, protecting hard-won performance gains against future regressions. The structural advantage achieved through R8 extends beyond immediate metrics. Using the open-source tool app-sizer to measure performance impact, Grab observed that R8 permanently lowered the download size cost associated with every line of code in the application. In the modern landscape of AI-assisted development, where code generation volumes expand rapidly, this optimization is vital. Without R8, rapid code expansion would proportionally bloat download sizes; instead, R8 ensures that code growth maintains a drastically reduced memory footprint. Through these systematic efforts, Grab’s Passenger App Core team successfully addressed escalating startup times and post-release performance spikes, delivering a faster, more stable superapp experience for millions of users across Southeast Asia while equipping its engineers to scale features sustainably. Post navigation Google Play Expands Developer Tools to Boost App Discovery, Social Engagement, and Business Growth