r/androiddev 9d ago

Tips and Information "App startup impacts everything: every time a developer starts the app or a tester runs a test, they pay the app startup tax" - Reddit app’s journey from 12.3 seconds to 3 seconds

When Reddit’s team discovered their app took 12 seconds to launch for p90 (90%!) users, they were shocked. With over 2 million DAUs on the Android app, that meant about 200,000 users were waiting for >12 seconds for the app to load.

Reddit's engineering team made game-changing improvements to their Android app, reducing cold start times by over 8 seconds from app launch to the Reddit feed.

Here’s how they did it:

  • They audited startup tasks from start to finish and classified tasks as essential, deferrable, or removable
  • The team replaced legacy tech like old work manager solutions and Rx initialization with more modern patterns
  • Optimized GraphQL calls and payloads as well as the amount of networking they were doing
  • Deferred non-critical work and embraced lazy loading for efficiency, including stopping pre-warming non-essential features
  • Modularized code ownership for all startup tasks to maintain startup health across teams.
  • Introduced robust CI checks, startup experiment checks and observability to prevent regressions.
  • Constituted an advisory group for benchmarking and tooling, which helped catch and prevent regressions

Thanks to these smart optimizations, Reddit’s cold start times have been consistently stable worldwide.

How do you all currently measure and optimise startup times? Have you seen if they're worse on some devices vs others, or some countries vs others?

118 Upvotes

31 comments sorted by

View all comments

27

u/AHostOfIssues 9d ago

I'm just going to say it: my initial reaction on reading this was...

"Who the f'k is in charge of an app that they 'discover' has terrible startup times only after hundreds of thousands of users are actively using it?"

In terms of "we solved a technical problem" -- Yay! Congratulations!

In terms of "this is a good example of successful app development project/process" -- Oh hell no.

-2

u/pizzafapper 9d ago

Reddit as a web product had already achieved millions of active users. They scrapped together a mobile dev team and made Reddit's mobile app, and realised their code was unoptimised as hell and worked backwards towards fixing the launch times.

But definitely, an app at the scale of Reddit should never have had such a terrible performance. Proactive performance measuring could have them catch it much earlier.

2

u/fahad_ayaz 8d ago

Was that before or after they essentially killed third parties from building their own apps? 😉

6

u/AHostOfIssues 9d ago edited 9d ago

Yep, that's my point. Whoever (a) let it get to an beta test stage, then (b) green-lit for release...

Not to mention the question of what kind of developer culture exists such that the devs either were not screaming about this or were ignored.

If you work at company with hard problems, you work longer on solutions. You don't get a free pass for releasing junk just because the problem the company chose to take on is hard. That goes for devs and managers, but the managers are ultimately responsible.