Reddit improved app startup pace by over 50% utilizing Baseline Profiles and R8



Posted by Ben Weiss – Developer Relations Engineer, and Lauren Darcey – Senior Engineering Supervisor, Reddit

Reddit is among the world’s largest web boards, bringing collectively numerous communities on the lookout for leisure, solutions to on a regular basis questions, and a lot extra.

Lately, the group optimized its Android app to scale back startup pace and enhance rendering efficiency utilizing Baseline Profiles. However the group didn’t cease there. Reddit app builders additionally enabled Android’s R8 compiler in full mode to maximise bytecode optimization and used Jetpack Compose to rewrite legacy UI, bettering each the person and developer expertise.

Maximizing optimization utilizing Baseline Profiles and R8 full mode

The Reddit Android app has undergone numerous efficiency upgrades over time. Reddit builders have lengthy since cleared the record of fast and straightforward duties for optimization, however the group nonetheless desires to enhance the app, bringing its efficiency to the subsequent stage and making certain it runs effectively on each Android gadget.

“Reddit is on the lookout for any strategic enchancment to its app efficiency so we will make the app expertise higher for brand spanking new and present customers,” stated Rob McWhinnie, a employees engineer at Reddit. “Baseline Profiles match this use case effectively since they’re primarily based on vital person journeys.”

Reddit’s platform engineering group used screen-specific efficiency metrics and observability to assist its characteristic groups enhance key metrics like time to interactive and scroll efficiency. Baseline Profiles have been a pure match to assist enhance these metrics and the person expertise behind them, so the group built-in them to make monitoring and optimizing simpler, utilizing insights from geodata and gadget courses.

The group constructed Baseline Profiles for 5 vital person journeys up to now, like scrolling the house feed, logging in, launching the full-screen video participant, navigating between subreddits and scrolling their feeds, and utilizing the chat characteristic.

Simplifying Baseline Profile administration of their steady integration processes, enabled Reddit to take away the necessity for guide upkeep and streamlining optimization. Now, Baseline Profiles are robotically regenerated for every launch.

Enabling Android’s R8 optimization compiler in full mode was one other space Reddit engineers labored on. The group had already used R8 in compatibility mode, however a few of Reddit’s legacy code would’ve made implementing R8’s extra aggressive options troublesome. The group labored by way of the app’s present technical debt first, making it simpler to combine R8’s full mode capabilities and maximize Android app optimization.

Quote card with image of Catherine Chi, Senior Engineer at Reddit that reads: 'It’s now trivial to work with a team to instrument Baseline Profiles for their critical user journeys. We turn them around in a couple of hours and see results in production a week later.

Enhancements with Baseline Profiles and R8 full mode

Reddit’s Baseline Profiles and R8 full mode optimization led to a number of efficiency enhancements throughout the app, with early benchmarks of the primary Baseline Profile for feeds displaying a 51% median startup time enchancment. Whereas responses from Redditors initially confirmed giant startup enhancements, Baseline Profile optimizations for much less frequent journeys, like logging in, noticed fewer person reviews.

Baseline Profiles for the house feed had a 36% discount in frozen frames’ ninety fifth percentile. Baseline Profiles for the neighborhood feed additionally delivered robust display screen load and scroll efficiency enhancements. On the ninetieth percentile, display screen Time To Interactive improved by 12% and time to first draw decreased by 22%. Reddit’s scrolling efficiency additionally noticed a 12% discount in P90 sluggish frames.

The improve to R8 full mode led to a rise in Google Play common rankings. The proportion of worldwide optimistic rankings (fours and fives) elevated by 4 p.c, with a notable lower in adverse reviews. R8 full mode additionally decreased whole application-not-responding errors by nearly 30%.

Total, the app noticed chilly begin enhancements of 20%, scroll efficiency enhancements of 15%, and widespread enhancements in lower-end units and rising markets. Google Play vitals noticed enhancements in sluggish chilly begins, a ten% discount in extreme frozen frames, and a 30% discount in extreme sluggish frames. Almost 75% of screens, refactored utilizing Jetpack Compose, skilled efficiency positive factors.

Quote card with image of Lauren Darcey, Senior Engineering Manager at Reddit that reads: 'When you find a feature that users love and engage with, taking the time to refine and optimize it can be the difference between a good and a great experience for your users.

Additional optimizations utilizing Jetpack Compose

Reddit adopted Jetpack Compose years in the past and has since rebuilt a lot of its UI with the toolkit, benefitting each the app and its design system. In keeping with the Reddit group, Google’s ongoing assist for Compose’s stability and efficiency made it a powerful match as Reddit scaled its app, permitting for extra environment friendly characteristic growth and higher efficiency.

One main instance is Reddit’s feed rewrite utilizing Compose, which resulted in additional maintainable code and an improved developer expertise. Compose enabled groups to deal with future work as a substitute of being slowed down by legacy code, permitting them to repair bugs shortly and enhance general app stability.

“The R8 and Compose upgrades have been necessary to deploy in relative isolation and stabilize,” stated Drew Heavner, a employees engineer at Reddit. “We really feel like we bought nice outcomes from this work for all groups adopting our trendy tech stack and Compose.”

After upgrading to the September 2024 launch of Compose, the most recent iteration, Reddit noticed vital efficiency positive factors throughout the board. Chilly begin occasions improved by 13%, extreme sluggish frames decreased by 25%, and frozen frames dropped by 10%. Low- and mid-tier units noticed even larger enhancements the place app begin occasions improved by as much as 40%, particularly in markets with lower-performing units.

Screens utilizing Reddit’s trendy Compose-powered design stack confirmed substantial enhancements in each sluggish and frozen body charges. For instance, the house feed noticed a 23% discount in frozen frames, and scrolling efficiency visibly improved in accordance with inner critiques. These updates have been effectively obtained amongst customers and mirrored a 17% improve within the app’s Google Play common score.

Quote card with image of the Android Bot peeking in from the right side that reads: Compose continues to deliver great new features for a more responsive user experience. It also provides stability and performance improvements we get to take advantage of.” — Eric Kuck, a Principal Engineer at Reddit

Up-leveling UX by way of optimization

Including worth to an app isn’t nearly introducing new options—it is about refining and optimizing those customers already love. Investing in efficiency enhancements made Reddit’s key options quicker and extra dependable, enhancing the general person expertise. These optimizations not solely improved app startup and runtime efficiency but additionally simplified growth workflows, rising each developer satisfaction and app stability.

The deal with high-traffic options, similar to feeds, has demonstrated the ability of efficiency tuning, with substantial positive factors in person engagement and satisfaction. Because the app has develop into extra environment friendly, each customers and builders have benefitted from a cleaner codebase and quicker efficiency.

Trying forward, Reddit plans to increase the utilization of Baseline Profiles to different vital person journeys, together with Reddit’s put up and remark experiences, making certain much more customers profit from these ongoing efficiency enhancements.

Reddit’s platform engineers additionally need to proceed collaborating with characteristic groups to combine efficiency enhancements throughout the app. These efforts will make sure that because the app evolves, it stays a clean, quick, and interesting expertise for all Redditors.

“Including new options isn’t the one approach so as to add worth to an expertise for customers,” stated Lauren Darcey, a senior engineering supervisor at Reddit. “Whenever you discover a characteristic that customers love and interact with, taking the time to refine and optimize it may be the distinction between a very good and an excellent expertise on your customers.”

Get began

Enhance your app efficiency utilizing Baseline Profiles, R8 full mode, and Jetpack Compose.



Supply hyperlink

admin
We will be happy to hear your thoughts

Leave a reply

Shopping cart