An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger Hilt, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.
MIT License
767
stars
165
forks
source link
Add M1 Mac support & Optimize app startup by deferring initialization of non-critical components #56
This PR adds native support for running and building the Instant Weather app on Apple Silicon M1 Macs. Key changes include:
Update Android Gradle Plugin to 7.0+ and Gradle to 7.0+ for M1 support
Update Room library to 2.4.0+ for M1 compatibility
Update any other libraries to latest versions for better M1 support
Configure Android Studio emulator to run ARM images natively on M1
Update CI/CD pipelines to build and test on M1 agents
This allows the app to build and run much faster by leveraging the performance of the M1 chip. The emulator can now run ARM images natively for quicker app deployment and testing.
Also Optimize app startup by deferring initialization of non-critical components
Currently the app initializes several components like WorkManager, Analytics, Crashlytics etc. during app launch on the main thread. This slows down app startup.
We can improve this by:
Deferring initialization of non-critical SDK components until after app launch
Moving initialization work off the main thread wherever possible
Lazy loading features/screens not required during startup
Enabling R8 full mode to remove unused code
These optimizations can help bring the app startup time under 1 second to meet the Android Vitals baseline and provide a better experience to users.
This PR adds native support for running and building the Instant Weather app on Apple Silicon M1 Macs. Key changes include:
Also Optimize app startup by deferring initialization of non-critical components
Currently the app initializes several components like WorkManager, Analytics, Crashlytics etc. during app launch on the main thread. This slows down app startup.
We can improve this by: