Glad to see you again. Right now I’m in Jastarnia, having a cup of tea, looking at the beautiful Baltic sea. While having a nice break, I found some new articles on Android Performance that I want to share with you.
Let’s get straight to them 👉
If these links don't work in your email client, try reading this issue on my website.
- How to measure and improve your Android App Startup times
- Gotchas in Jetpack Compose Recomposition
- Comparing Jetpack Compose performance with XML
- Appyx vs Jetpack Compose Navigation
1) Let’s start from the begginning - measuring and analyzing your app startup times. After some time your app may become very heavy and if you don't care enough you'll startup times will get slow. Find out how to prevent it below.
2) Compose is great and using it makes development much MUCH faster. BUT! At the same time your app could get really slow, especially because of the unnecessary recompositions performed by your code. Compose has a lot of gotchas. Let's be clear - in most cases it's Google's fault, but still we have to care about it to deliver the best experience to our users. Here's a couple of them 👇
3) As I said earlier - Compose is great, but sometimes it lacks performance. Even if you minimize recompositions, you're still going to notice slower rendering than in XMLs. Does it mean Compose is bad? Short answer is no, but it depends what you want to build. Because of that, you should know exactly what is different in terms of performance, comparing Compose to XMLs 🤔
4) I don’t like a lot of things in Android, but probably navigation and back stack are the winners of them all, especially in Compose 🤪. Like a man in life, I like to be independent. Same goes for coding. Whenever I can, I don’t rely on Google’s “ping pong” APIs (ex.
onActivityResult), I use custom navigation (ex. Coordinators) and I wrap as many things as possible into easy to use, straightforward and reusable use cases. That’s why when I found Appyx I was really excited about its navigation in Compose. Here’s a nice comparison of Google’s Navigation Compose to Appyx - independent way of handling back stack
Thanks for reading, hope you liked it. See you in a bit! 😄
For previous issues, visit archive on my website.