Tinder Enhances Performance with R8 Configuration Analyzer

Tinder has taken significant strides to enhance the performance of its Android application, aiming to foster real connections by simplifying the experience for singles. As the app evolved, the complexity of its codebase increased, leading to challenges in optimization.
Addressing Code Complexity
Before implementing their latest optimization strategies, Tinder’s application was burdened with a substantial amount of unoptimized code. Approximately 70% of the app was not optimized, comprising 17 dex files, including three dedicated solely to startup processes. Although Tinder had enabled R8, many of its optimization capabilities were hindered by existing keep rules, making it difficult for the development team to pinpoint which specific rules were obstructing efficiency.
Introducing the R8 Configuration Analyzer
To tackle these performance issues, Tinder utilized the R8 Configuration Analyzer, a tool designed to enhance R8 optimization by monitoring shrinking, optimization, and obfuscation scores. This analyzer provides insights into redundant or obsolete keep rules, including those from external libraries, enabling developers to analyze the impact of these rules and refine them accordingly.
- Key Features of the R8 Configuration Analyzer:
- Tracks optimization, obfuscation, and shrinking scores
- Highlights the most impactful keep rules
- Facilitates auditing of keep rules and their effects
To streamline the use of the R8 Configuration Analyzer, Tinder introduced an R8 Analyzer skill, which summarizes the report to display crucial metrics and highlights the five most impactful keep rules, providing developers with clear insights into optimization barriers.
From Technical Debt to Performance Gains
Prior to using the R8 Configuration Analyzer, Tinder faced significant technical debt due to its unoptimized codebase, which adversely affected user experience through slow cold starts. The analysis revealed that the optimization level was around 28% even with R8 fully activated. A major issue identified was an in-house library that introduced a broad keep rule, unintentionally encompassing various dependencies and preventing optimization across numerous classes.
By leveraging the insights from the R8 Configuration Analyzer, Tinder’s team was able to trace and analyze the specific classes impacted by this broad keep rule. They discovered that optimization was hindered in larger classes that could benefit from R8’s capabilities. Refining this keep rule unlocked substantial optimization potential, increasing R8 scores from 28% to 50% and resulting in immediate performance improvements throughout the application.
Impact on Business Growth and User Engagement
The optimization efforts not only enhanced the technical performance of the app but also translated into tangible business growth and increased user engagement, especially in resource-constrained markets. Recognizing that code minification is an ongoing process, the Tinder team has integrated optimization monitoring into their daily workflows to prevent regressions.
A new job was added to their CI/CD pipeline to report changes in optimization statistics, allowing developers to see how their contributions affect overall optimization. The team emphasizes the importance of auditing internal dependencies, as stable internal projects may introduce broad rules that negatively impact optimization, unlike well-defined rules from popular third-party libraries.
Continuous Improvement and Future Goals
With a focus on refining their app’s performance, Tinder has successfully reduced cold starts by nearly 50% and shrank their APK size by over 28%. The R8 Configuration Analyzer proved to be an invaluable tool in identifying overly broad internal library rules, enabling the team to confidently optimize their codebase. As they continue to work towards further enhancements, the Tinder team remains committed to establishing a more efficient and high-performing application for users.
Source for the original facts: Original source.




