Skip to content

Suman942/android_cold-start_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

android_cold-start_optimization

“Learnings from reducing Android app cold start time (15s → 3s).”

🚀 Android Cold Start Optimization – Learnings

I reduced my app’s cold start time from 10–15 seconds to ~3 seconds. Here I’m sharing techniques and insights.

📊 Before vs After

Metric Before After
Cold Start Duration 10–15 seconds ~3 seconds

💡 Key Techniques

✅ Lazy Initialization
✅ App Startup Library
✅ Move heavy work off Main Thread (Work manager or any other background thread) ✅ Splash Screen Optimization use Splash API ✅ Avoid nesting of layouts

✅ Avoid heavy task in Application class if required use background thread ✅ Reduce APK size remove unnecessary medias ✅ Keep onCreate and onResume stress free ✅ Make sure GC not triggered initially (GC runs in main thread) which blocks the UI ✅ Try to Make Memory Efficient – Optimize memory usage at startup to avoid triggering Garbage Collection (GC) on the main thread. GC runs on the main thread and can freeze the UI if large objects are allocated during initialization. ✅ Prevent Garbage Collection (GC) at Startup – Related to memory efficiency, avoid large memory allocations early in the app lifecycle.

✅ Splash Screen Optimization – Use SplashScreen API

👨‍💻 Author

Suman Shil – Android Developer
GitHub Profile | LinkedIn | Medium

About

“Learnings from reducing Android app cold start time (15s → 3s).”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors