How Grab Supercharged its Android App Performance Through Strategic R8 Optimization and Infrastructure Modernization

Grab, the preeminent superapp serving millions across eight Southeast Asian nations, has successfully navigated the formidable technical challenges associated with maintaining a decade-old, 10-million-line codebase. By shifting from legacy configuration management to a sophisticated, multi-phase deployment of R8 optimization, Baseline Profiles, and Startup Profiles, the engineering team has achieved significant performance gains. These technical refinements have resulted in a 32.5% reduction in Application Not Responding (ANR) events, a 30.4% decrease in total app download size, and a 35% improvement in cold start times, setting a new benchmark for large-scale mobile application engineering.
The Complexity of the Superapp Ecosystem
For a superapp like Grab, the complexity of the codebase is compounded by its functional breadth. The platform integrates ride-hailing, food delivery, financial services, and logistics into a single, unified interface. Over the course of ten years, this evolution resulted in a sprawling architecture built on a hybrid of Bazel and Gradle build systems. As the service offerings grew, so did the technical debt.
The primary pain points for the Passenger App Core team were twofold: a ballooning app size that discouraged downloads in emerging markets with varying data connectivity, and recurring "ANR spikes"—instances where the user interface became unresponsive during the critical initialization phase of the app. These performance regressions typically manifested immediately following new feature releases, creating a cycle of instability that necessitated urgent intervention.
Chronology of the Optimization Strategy
The remediation process was not a singular event but a methodical, three-phase journey spanning 2025 and 2026. The engineering team recognized that relying on standard Google Play Cloud Profiles was insufficient for their unique, high-traffic initialization paths, such as the complex Dagger dependency graph construction required during the initial launch.

Phase 1: The Foundation of R8 (2025)
The first phase involved transitioning from legacy Proguard configurations to the proguard-android-optimize.txt file, which effectively enabled the R8 optimizer. This was a high-stakes migration given the sensitivity of the massive, decade-old codebase. By integrating Baseline Profiles and Startup Profiles alongside R8 Compat mode, the team achieved an immediate 25% drop in user-perceived ANRs and a 16% reduction in download size. This phase proved that systematic optimization could coexist with the rapid feature delivery required by a superapp.
Phase 2: Transitioning to R8 Full Mode (2026)
Nine months after the initial rollout, Grab moved to "R8 Full Mode." This phase was characterized by aggressive code shrinking and optimization. The team faced significant hurdles regarding reflection-heavy code, particularly with libraries like Gson and Java dynamic proxies. Because R8 relies on static analysis, it often struggles to detect runtime reflection, leading to potential crashes. The team avoided "blanket" exceptions—which would have bloated the app—and instead employed surgical, targeted keep rules. This precision allowed the app to shed an additional 14% of its size while further improving cold start times by 10%.
Phase 3: Governance and Keep-Rule Refinement
The final phase shifted the focus toward long-term maintainability. By integrating the R8 Configuration Analyzer, the team gained granular visibility into how their "keep rules" affected the compiler’s ability to shrink and obfuscate code. This phase introduced automated CI/CD guardrails, ensuring that no new code could be merged if it violated established performance standards.
Data-Driven Performance Outcomes
The cumulative effect of these optimizations is evidenced by the substantial gains across key performance indicators. The following table summarizes the impact of the three-phase rollout:
| Optimization Phase | ANR Reduction | Size Reduction | Cold Start Improvement |
|---|---|---|---|
| Phase 1: R8 Optimizer (2025) | ~25% | 16% | ~27% |
| Phase 2: R8 Full Mode (2026) | 10% | 14% | 10% |
| Keep-Rule Optimization | N/A | 3.6% | N/A |
| Cumulative Totals | ~32.5% | ~30.4% | ~35% |
These metrics are particularly noteworthy given the "superapp" context. Usually, as features are added to such applications, performance degrades linearly. Grab’s intervention effectively decoupled feature growth from performance decay.

The Role of Tooling and Internal Governance
Central to this success was the adoption of specialized internal tools, most notably the "app-sizer." By measuring the cost of every line of code in terms of download size, the engineering team was able to shift the culture toward "performance-first" development.
Nguyen Van Minh, Lead Software Engineer on the Passenger App Core team, noted that the recurring ANR spikes were a persistent challenge that mandated a more robust approach to initialization paths. By shifting these paths to be compiled into machine code at the time of installation, the team moved away from the reliance on Just-In-Time (JIT) compilation, which was a major contributor to the initial, sluggish performance on user devices.
Broader Implications for the Tech Industry
The success of Grab’s optimization initiative serves as a case study for companies managing aging, monolithic mobile architectures. In an era where AI-assisted coding is rapidly accelerating the production of new code, the "bloat" problem is becoming an industry-wide crisis. Grab’s methodology demonstrates that high-volume codebases do not have to succumb to performance degradation.
The implementation of "pre-merge guardrails" is perhaps the most significant takeaway for the broader software engineering community. By treating performance metrics—specifically R8 optimization scores—as a "test" that code must pass before it is merged into the main branch, companies can prevent the slow, incremental erosion of app quality. This proactive approach ensures that optimization is not a one-time project, but a continuous aspect of the software development lifecycle.
Conclusion and Future Outlook
Grab’s journey highlights the balance between rapid innovation and architectural discipline. By refining their R8 configurations and enforcing strict compilation governance, the company has managed to provide a more stable and faster experience for its millions of users.

The implications for the Southeast Asian digital economy are profound. As Grab continues to expand its service offerings, the ability to keep the application lightweight and responsive is a competitive advantage. Furthermore, the use of open-source tools and industry-standard practices, such as those detailed at d.android.com/r8, underscores a commitment to the broader Android developer ecosystem.
As the industry moves forward, the "Grab model" of continuous performance monitoring and CI/CD-integrated optimization is likely to become the gold standard for superapps and large-scale enterprise mobile applications worldwide. Through this rigorous, data-centric strategy, Grab has proven that technical debt is not an insurmountable obstacle, but rather a variable that can be managed with the right tools, discipline, and commitment to user experience.







