Southeast Asia’s leading superapp, Grab, has successfully overhauled its massive, decade-old Android codebase to deliver a significantly faster, leaner, and more stable experience for millions of users. Facing mounting technical hurdles—including creeping startup times, expanding app sizes, and post-release performance spikes—the engineering team implemented a comprehensive optimization strategy centered around advanced code shrinking, compilation profiling, and strict CI/CD governance. By strategically enabling R8 optimizations, refining keep rules, and deploying customized Baseline Profiles and Startup Profiles, Grab dramatically improved its key performance indicators. The company achieved a 32.5 percent reduction in user-perceived App Not Responding (ANR) rates, cut its app download size by approximately 30.4 percent, and accelerated cold start times by roughly 35 percent across its operations spanning eight countries. Read Also: Google Expands Android Developer Tooling with CLI Device Streaming and New AI Skills Android Bench 2.0 Launches With Long-Horizon Tasks and Agentic Evaluation for AI Coding Models Eliminating Post-Release ANR Spikes for a Smoother User Experience Prior to undertaking these performance initiatives, Grab’s development lifecycle faced a recurring obstacle. Every weekly app release was consistently accompanied by cold start delays and sharp spikes in user-perceived ANR rates. These performance regressions were primarily driven by the heavy overhead of reading numerous DEX files during the initial application launch sequence. While standard optimization solutions like Google Play’s Cloud Profiles offered baseline improvements for general user flows, they fell short of covering all initialization paths required for Grab’s complex, mission-critical user journeys. Essential architecture initialization sequences, such as setting up Dagger dependency graphs during app launch, lacked full distribution coverage. Consequently, devices relied on Just-In-Time (JIT) compilation and local background optimization over several days following an update to bridge the gap. To resolve this, the team deployed custom Baseline Profiles. By integrating Grab’s critical user journeys directly into Google Play’s distribution framework, key execution paths were compiled directly into machine code immediately upon installation. This targeted approach bypassed the initial compilation lag, effectively eliminating post-release ANR spikes and establishing a smoother launch sequence from the moment the app opened. Nguyen Van Minh, Lead Software Engineer on Grab’s Passenger App Core team, noted that the recurring ANR spikes had been an persistent friction point with every weekly release cycle. To combat this, the engineering team executed a multi-phase optimization roadmap that leveraged profile-guided compilation alongside the R8 code optimizer. This combination yielded immediate dividends, delivering a 12 percent cold start improvement from R8 configuration changes alone, followed by an additional 15 percent boost from Baseline Profiles. Together, these measures secured a 27 percent faster startup time right out of the gate. Phased Migration to R8 Optimization and Full Mode The optimization journey unfolded across distinct operational phases designed to safely untangle a codebase containing over 10 million lines of code built on a hybrid Bazel and Gradle setup. In the initial phase, Grab transitioned away from legacy Proguard configurations to adopt standard R8 optimization rules. Because the application codebase had matured over a decade, enabling the optimizer required careful navigation of legacy configurations and complex reflection patterns. By packaging this rollout alongside tailored Baseline Profiles and Startup Profiles, the team immediately slashed user-perceived ANR rates by 25 percent, reduced the app download size by 16 percent, and improved cold start times by 27 percent. Building on this foundation, the engineering team embarked on a migration to R8 Full Mode approximately nine months later. While common open-source libraries like Retrofit, Firebase, and Jetpack Compose integrated smoothly using existing rules, adapting the remainder of the massive codebase required solving optimization challenges tied to reflection-heavy components. Specifically, the team had to manage Java dynamic proxies, which utilize runtime reflection to generate interface implementations dynamically. Because compilation-stage analyzers cannot always predict runtime reflection usage, aggressive optimization can inadvertently strip or rename essential classes, leading to application instability. Rather than applying broad exemptions that would unnecessarily inflate the application package, engineers isolated the specific classes relying on reflection and established highly targeted keep rules. This precision preserved runtime stability while allowing the optimizer to operate at maximum efficiency. The transition to R8 Full Mode unlocked compounding performance dividends, delivering an additional 14 percent reduction in download size, a 10 percent improvement in startup times, and another 10 percent decrease in user-perceived ANRs. Enforcing Long-Term Codebase Health and Governance In the final phase of the optimization initiative, Grab shifted its focus toward maintaining long-term codebase hygiene and establishing proactive compilation governance. To systematically measure rule efficacy and prevent configuration regressions across ongoing release cycles, the engineering team integrated the R8 Configuration Analyzer into their evaluation workflow. This analytical tool provides deep visibility into how effectively application keep rules allow R8 to shrink, optimize, and obfuscate the software package. By methodically trimming legacy keep rules in tandem with R8 Full Mode, the team secured an additional 3.6 percent reduction in app download size, bringing cumulative download savings to over 30 percent. More importantly, tracking these diagnostic metrics provided the engineering organization with the objective data required to implement automated pre-merge guardrails within their continuous integration and deployment (CI/CD) pipeline. Under this governance model, newly introduced code is rigorously evaluated against strict keep-rule standards. Any new rules require explicit justification and review, ensuring that hard-won performance gains remain protected and that the application’s memory footprint does not creep upward as new features are developed. Long-Term Code Impact and Structural Advantages Beyond immediate user-facing metrics, the adoption of R8 optimization yielded a permanent structural advantage for Grab’s engineering operations. Utilizing the open-source evaluation tool app-sizer to measure resource utilization, the team observed that R8 fundamentally altered the cost profile of every line of code added to the repository. In an era defined by AI-assisted software development, where code generation volumes can expand rapidly, maintaining efficiency is paramount. Historically, unchecked code expansion directly correlates with an inflated application download size. The successful deployment of R8 ensures that future code expansion maintains a dramatically reduced memory footprint, allowing developers to ship new product features without imposing heavy storage penalties on end users. Through systematic profiling, advanced compilation modes, and strict architectural governance, Grab has transformed a maturing, resource-heavy superapp into a streamlined platform. The technical overhaul has successfully delivered a faster, more reliable digital experience across Southeast Asia while equipping internal development teams with the scalable tooling needed for sustainable future growth. Post navigation Grab Boosts Superapp Performance by Over 30% Through Advanced R8 Optimization and Baseline Profiles How Grab Overhauled Its Massive Superapp Architecture to Slash App Size by 30% and Boost Performance