Southeast Asian superapp giant Grab has successfully tackled long-standing performance bottlenecks in its flagship mobile application, achieving a dramatic reduction in app size and significantly improving user experience across eight countries. Managing a decade-old codebase spanning over 10 million lines of code and hundreds of third-party libraries built on a hybrid Bazel and Gradle setup, the engineering team confronted three mounting challenges: climbing Application Not Responding (ANR) rates, a continuously expanding app download size driven by the addition of new services, and a startup time that crept upward year over year. By strategically enabling R8 optimization, refining keep rules, and implementing custom Baseline Profiles and Startup Profiles, the Grab team reduced user-perceived ANR rates by roughly 32.5 percent, slashed the app download size by approximately 30.4 percent, and accelerated cold start times by 35 percent. These technical achievements have transformed the application’s underlying architecture, creating a leaner, faster, and more stable digital ecosystem for millions of daily active users throughout Southeast Asia. Read Also: Google Announces Major Updates to Android CLI and AI Agent Tooling for Developers Google Play Expands Developer Tools to Boost App Discovery, Engagement, and Business Growth Eliminating Post-Release ANR Spikes for a Smoother User Experience Prior to undertaking this comprehensive optimization initiative, Grab faced recurring performance hurdles marked by cold start delays and sharp spikes in App Not Responding incidents immediately following fresh software updates. These disruptions were primarily driven by the heavy computational overhead of reading numerous DEX files during the initial launch sequence of the application. Although Google Play’s Cloud Profiles offered baseline optimization for standard application flows across the broader user base, they fell short of covering all initialization paths essential to Grab’s critical user journeys—such as initializing Dagger dependency graphs during app launch. For code paths omitted from the initial distribution, mobile devices had to rely on Just-In-Time (JIT) compilation and local background optimizations over the course of several days following an installation. To bridge this gap, the engineering team implemented custom Baseline Profiles alongside Startup Profiles. This approach integrated Grab’s critical user journeys directly into Google Play’s Cloud Profiles, expanding optimization coverage so that key execution paths were compiled directly into machine code the moment the app was installed. Nguyen Van Minh, Lead Software Engineer on Grab’s Passenger App Core team, noted that the company historically experienced ANR rate spikes with every weekly release cycle. Through profile-guided optimization and the implementation of the R8 optimizer, Grab achieved an immediate 12 percent cold start improvement from R8 and an additional 15 percent boost from Baseline Profiles. Together, these measures yielded a 27 percent faster startup time and effectively flattened the post-release ANR spikes that had troubled previous releases. The optimization roadmap unfolded across three distinct phases: enabling R8 optimization in compatibility mode, transitioning to R8 Full Mode, and refining keep rules with configuration analyzers supported by continuous integration governance. Phased Rollout of R8 Optimization and Full Mode Migration The optimization journey began in earnest with the shift away from legacy default Proguard configurations toward proguard-android-optimize.txt, which unlocked core R8 optimization capabilities. Given the sheer scale of a ten-year-old codebase containing more than 10 million lines of code, enabling the optimizer required resolving legacy configuration conflicts and managing extensive reflection usage. To maximize the impact of this initial rollout, Grab shipped the R8 compatibility mode update bundled with Baseline Profiles and Startup Profiles. This initial push resulted in an immediate 25 percent reduction in user-perceived ANRs, a 16 percent decrease in app download download size, and an overall 27 percent improvement in cold start execution times. Building upon this foundation nine months later, the engineering team advanced the application into R8 Full Mode to unlock deeper optimization potential. While standard third-party libraries like Retrofit, Firebase, and Jetpack Compose integrated smoothly using their built-in rules, migrating the remainder of the massive codebase required untangling reflection-heavy code paths. The team adopted consumer keep rules from recent Gson releases to guarantee seamless JSON parsing and addressed optimization challenges associated with Java dynamic proxies. Because dynamic proxies utilize reflection to generate interface implementations at runtime—a process invisible to R8 during compilation—careful handling was required to prevent the optimizer from stripping necessary classes and triggering application crashes. Rather than applying broad exceptions that would bloat the application package, engineers isolated specific reflection-reliant classes and implemented highly targeted keep rules to preserve stability. The migration to R8 Full Mode delivered compounding architectural benefits, including an additional 14 percent reduction in app download size, a further 10 percent improvement in startup times, and another 10 percent decrease in user-perceived ANRs. These enhancements provided clear metrics on configuration efficiency and highlighted areas where keep rules could be further streamlined. Keep-Rule Refinement and Long-Term Codebase Governance In the final phase of the optimization initiative, Grab shifted its focus toward establishing long-term codebase health, continuous performance monitoring, and strict compilation governance. To systematically measure rule hygiene and prevent configuration regressions across ongoing release cycles, the engineering team integrated the R8 Configuration Analyzer into their evaluation workflows. This tool provided deep visibility into how effectively the application’s keep rules allowed R8 to shrink, optimize, and obfuscate the codebase. Methodically trimming legacy keep rules yielded an additional 3.6 percent reduction in app download size. More importantly, tracking these diagnostic metrics equipped the engineering team with the objective data required to implement automated pre-merge CI guardrails. These guardrails ensure that newly introduced code adheres to strict keep-rule standards, protecting hard-won performance gains against future software bloat. Beyond immediate performance gains, enabling the R8 optimizer yielded a permanent structural advantage for Grab’s massive codebase. Utilizing the open-source tool app-sizer to measure the impact of R8, the team observed that the optimizer permanently lowered the download size cost associated with every line of code. In an era of AI-assisted development where code volume expands rapidly, this structural efficiency is vital. Without R8, code expansion proportionally inflates download sizes, whereas R8 ensures that code growth maintains a drastically reduced memory footprint. By proactively addressing increasing startup times and post-release performance spikes through Baseline Profiles and continuous R8 configuration improvements, Grab’s Passenger App Core team has established a sustainable model for managing software at scale. The cumulative outcome—a 32.5 percent reduction in user-perceived ANRs, a 30.4 percent reduction in app download size, and a 35 percent improvement in cold start times—delivers a faster and more stable superapp experience for millions of users across Southeast Asia while equipping developers to scale features without the penalty of rapid application bloat. Post navigation Google Play Expands Multi-Surface Commerce to Help Developers Reach Buyers Beyond the App