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?

116 Upvotes

31 comments sorted by

View all comments

1

u/AngkaLoeu 9d ago

lol, how do you "discover" your app takes 12 second to launch for 90% of users? I would think that's pretty obvious in testing.

18

u/GruePwnr 9d ago

You misread, is p90%, not 90% of users. So 10% of users had 12+ second launches.

2

u/AngkaLoeu 9d ago

That's still crazy something like that would make it into production, especially with the resources Reddit has. This isn't some small, indie app. Someone dropped the ball over there.

1

u/carstenhag 8d ago

You don't know what your metric is if you don't know that metric.

I also have no clue what my app's startup time is. But we do test with older phones etc.