通过 AI 辅助调试实现大规模 R8 优化

Grab is Southeast Asia’s leading superapp, providing a suite of services that bring essential needs to users throughout the region. Its offerings include ride-hailing, food delivery, parcel delivery, mobile payments, and more. With safety, efficiency, and user-centered design at heart, Grab remains dedicated to solving everyday issues and improving the lives of millions. As our app continues to expand, we identified platform-level performance challenges that were affecting user experience across the board. In this article, we share how we successfully enabled R8 optimization for the Grab Android app, achieving significant improvements in app size, startup time, and stability through innovative AI-assisted debugging techniques.

Grab 是东南亚领先的超级应用,提供一系列服务,将基本需求带给整个地区的用户。其产品包括网约车、外卖配送、包裹递送、移动支付等。以安全、高效和以用户为中心的设计为核心,Grab 致力于解决日常问题并改善数百万人的生活。随着我们的应用不断扩展,我们发现了影响整个用户体验的平台级性能挑战。在本文中,我们分享了如何成功为 Grab Android app 启用 R8 优化,通过创新的 AI 辅助调试技术,在应用大小、启动时间和稳定性方面实现了显著改进。

Introduction

介绍

Since 2024, our team observed a concerning trend: Application Not Responding (ANR) rates were spiking across the Grab app. Unlike typical isolated issues, the data revealed that ANRs were happening everywhere, not confined to specific features or modules. This pattern pointed to platform-level causes, with our analysis showing strong correlations between ANRs and several factors like memory pressure (particularly when garbage collection was triggered), ad-heavy user flows, overhead from heavy use of Jetpack Compose within XML layouts, and XML views within Compose code.

自 2024 年以来,我们团队观察到一个令人担忧的趋势:Grab 应用中的 Application Not Responding (ANR) 率在飙升。与典型的孤立问题不同,数据显示 ANR 无处不在,不限于特定功能或模块。这种模式指向平台级原因,我们的分析显示 ANR 与几个因素有很强的相关性,如内存压力(特别是垃圾回收触发时)、广告密集的用户流程、在 XML 布局中大量使用 Jetpack Compose 的开销,以及在 Compose 代码中的 XML 视图。

The Android community had long proven that R8 optimization (beyond basic code shrinking) could deliver substantial performance gains and app size reductions. As Grab has been adopting Jetpack Compose over the last two years, Google’s Jetpack Compose perfor...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.0. UTC+08:00, 2026-03-24 03:16
浙ICP备14020137号-1 $访客地图$