Grab Transforms Superapp Performance Through Strategic R8 Optimization and Infrastructure Modernization

Grab, the preeminent superapp of Southeast Asia, has achieved a significant milestone in mobile engineering by successfully optimizing its massive, decade-old codebase to deliver a vastly improved user experience. Through a comprehensive, multi-phase technical overhaul, the company addressed critical performance bottlenecks—specifically rising App Not Responding (ANR) rates, bloated application size, and increasing startup latency—that had plagued the platform as it expanded its services. By leveraging advanced Android build tools including R8 optimization, Baseline Profiles, and Startup Profiles, Grab has demonstrated how large-scale enterprise applications can combat technical debt to achieve a 32.5% reduction in user-perceived ANRs, a 30.4% decrease in download size, and a 35% improvement in cold start performance.
The Challenge of Scale and Complexity
Operating across eight countries and offering a diverse ecosystem of services—ranging from food and grocery delivery to ride-hailing and financial services—Grab manages an exceptionally complex mobile architecture. Over the course of ten years, the Passenger App Core team amassed a codebase exceeding 10 million lines of code, supported by a hybrid infrastructure involving both Bazel and Gradle build systems.
As the "superapp" model continued to add features, the application grew in both weight and complexity. The primary technical challenges were twofold: the overhead associated with the initialization of numerous DEX (Dalvik Executable) files during the cold-start phase, and the reliance on Just-In-Time (JIT) compilation, which failed to adequately support the initialization paths for critical user journeys. Consequently, each major update was often followed by spikes in ANR reports, as the application struggled to manage its dependency graphs and initialization sequences under the constraints of various device hardware profiles.

A Three-Phase Engineering Roadmap
To address these systemic issues, the Grab engineering team embarked on a rigorous optimization journey spanning from 2025 to 2026. This was not merely a cosmetic update, but a fundamental restructuring of how the application is compiled and delivered to the end user.
Phase 1: Adopting Modern Optimization Tools
In 2025, the team transitioned away from legacy Proguard configurations in favor of the more robust proguard-android-optimize.txt settings. This shift enabled the R8 optimizer, a powerful tool designed to shrink and optimize code. To ensure the transition was successful, the team implemented Baseline Profiles and Startup Profiles. By defining critical user journeys—such as the specific paths taken to initialize Dagger dependency graphs—the team ensured that these paths were compiled into machine code immediately upon installation, bypassing the performance-draining JIT compilation phase. This initial phase resulted in an immediate 25% reduction in ANR rates and a 16% reduction in app size.
Phase 2: The Shift to R8 Full Mode
By 2026, the team moved to "R8 Full Mode," which unlocks deeper, more aggressive optimization capabilities. The migration required significant effort, particularly in handling reflection-heavy code paths that are common in legacy architectures. Because R8 performs static analysis, it often struggles with dynamic proxies and reflection, which are common in libraries like Gson or Java dynamic proxies. Instead of taking the easy route—which would have involved broad exceptions that increase binary size—the team performed granular analysis to isolate specific classes. By implementing targeted "keep rules," they maintained application stability without sacrificing the gains made by the optimizer. This phase alone contributed an additional 14% reduction in download size and a 10% improvement in startup times.
Phase 3: Governance and Keep-Rule Refinement
The final phase of the project focused on long-term sustainability. The team integrated the R8 Configuration Analyzer into their CI/CD workflow. This tool acts as a watchdog, providing visibility into how effectively the application is being shrunk and obfuscated. By establishing strict "keep-rule" hygiene, the team prevented "configuration creep," where developers add unnecessary rules that bloat the app over time. The introduction of pre-merge guardrails means that any new code must justify its impact on the build, ensuring that the performance gains achieved over the last two years are institutionalized rather than transient.

Quantifiable Performance Outcomes
The cumulative effect of these initiatives is a testament to the power of methodical infrastructure investment. The following table summarizes the impact across the core performance metrics:
| Optimization Phase | ANR Reduction | Size Reduction | Cold Start Improvement |
|---|---|---|---|
| Phase 1: R8 Optimizer | ~25% | 16% | ~27% |
| Phase 2: R8 Full Mode | 10% | 14% | 10% |
| Keep-Rule Refinement | – | 3.6% | – |
| Overall (Cumulative) | ~32.5% | ~30.4% | ~35% |
Broader Implications for AI-Driven Development
The Grab case study offers a critical lesson for the broader software industry, particularly in the era of AI-assisted coding. As AI tools facilitate the rapid generation of new code, the volume of source code in enterprise applications is expanding at an unprecedented rate. Without aggressive optimization tools like R8, this expansion leads to "bloat-by-default," where the cost of a new feature is disproportionately reflected in the application’s download size and memory footprint.
Grab’s internal metrics, tracked using their custom-built app-sizer tool, revealed that R8 has effectively lowered the "cost per line" of code. This suggests that for companies managing massive, evolving codebases, optimization is not a one-time project but a continuous requirement. By decoupling feature growth from performance degradation, Grab has created a scalable architecture that can accommodate future innovation without sacrificing the user experience.
Expert Insights and Industry Context
The success of this initiative highlights a broader trend in mobile development: the move toward "profile-guided optimization." While Google Play provides cloud-based profiles for the general population, enterprise apps with unique initialization patterns—like those involving complex financial transactions or localized mapping services—require custom tuning.

Nguyen Van Minh, Lead Software Engineer on Grab’s Passenger App Core team, noted that the spike in ANR rates post-release was a recurring frustration that threatened the app’s reputation for reliability. By moving away from local, device-dependent optimization to a pre-compiled machine code approach via Baseline Profiles, the team successfully neutralized the "cold start penalty."
Industry analysts point out that for a superapp of Grab’s scale, a 30% reduction in app size is not just a technical victory; it is a business imperative. In emerging markets across Southeast Asia, where mobile data costs and device storage capacities vary significantly, a lighter, faster application directly translates to better user retention and broader market penetration.
Conclusion: A New Standard for Superapps
Grab’s journey from a decade-old, monolithic codebase to a highly optimized, performant platform serves as a blueprint for other technology giants. The combination of R8 Full Mode, rigorous CI/CD guardrails, and a commitment to profile-guided optimization has transformed the app’s baseline performance.
As the company looks toward the future, the integration of these performance metrics into the developer workflow ensures that the "superapp" remains fast, even as it grows. The ability to ship new features while simultaneously shrinking the application’s footprint is the hallmark of mature, disciplined engineering. By prioritizing the health of their underlying architecture, the Grab team has ensured that their platform remains robust enough to support the next decade of digital growth in Southeast Asia.







