Glance Kapil Sachan Aug 21, 2024

How We Improved Our 1Weather Android App Cold Startup Time by Over 70%

Article Summary

The 1Weather team slashed their Android app cold start time by over 70% and reduced slow starts by 24%. Here's the systematic approach that got them there.

Serving 100M+ users globally, the 1Weather engineering team knew every millisecond mattered for user retention. They used internal tooling (Raven Blitz) plus Android Studio Profiler to identify bottlenecks, then executed targeted fixes across their startup flow.

Key Takeaways

Critical Insight

Cold startup time dropped 70%+ (p90: 80ms to 60ms) and slow cold starts decreased 24.89%, putting 1Weather 6% ahead of industry peers.

The team isn't stopping here: they're already implementing Baseline Profiles and the App StartUp library for even faster performance.

About This Article

Problem

1Weather's app had a slow cold startup. The main thread was blocked by I/O operations and JSON deserialization. Legacy SDKs took a long time to initialize. The launch screen was also a problem, with its deep view hierarchy causing delays in the initial render.

Solution

Kapil Sachan's team implemented lazy initialization using Hilt dependency injection. They moved SDK setup to background threads with ExecutorService. The launch screen was simplified by switching to ConstraintLayout. They also removed outdated SDKs and updated the remaining libraries to their latest versions.

Impact

Cold startup time improved from 80,043ms to 60,303ms at the p90 level. Firebase metrics showed p50 startup times dropped significantly after the optimization. 1Weather now performs 6.04% better than industry competitors on startup speed.