Enhancing Jetpack Compose app performance

  Рет қаралды 27,852

Android Developers

Android Developers

Күн бұрын

In this video, Tomáš will demonstrate techniques for improving Jetpack Compose app performance through measurement, debugging, and strategic optimization.
You will gain insights into the effective use of Macrobenchmarks in Compose to understand startup and runtime performance. Additionally, you'll explore how tracing can provide deeper insights into the behavior of your composables. You will also learn to debug stability issues using the layout inspector and composition debugger.
Lastly, we will share techniques to overcome performance challenges, ensuring a smoother app experience.
Chapters:
00:00 - Introduction
00:10 - R8 and baseline profiles effects
01:17 - Measure → Debug → Improve
01:51 - Measure with Jetpack Macrobenchmark
03:53 - StartupMode explanation
05:02 - CompilationMode explanation
06:00 - Measure app startup and report fully drawn state
08:47 - Measure frame timing
09:55 - Debug with system tracing
12:46 - Add more information to system tracing
16:38 - Measure recompositions
18:02 - Layout Inspector and Composition Debugger
20:10 - Update Jetpack Compose!
20:30 - Generate a baseline profile
20:32 - Defer phases when frequently changing state
24:04 - Use BoxWithConstraints only when needed
24:48 - remember{} only heavy operations
25:26 - Load heavy images asynchronously
26:13 - Split heavy frames
27:13 - Outro
Resources:
Compose Performance → goo.gle/488Z03b
Macrobenchmark → goo.gle/3K6w0hs
Catch more videos → goo.gle/Jetpack-Compose
Subscribe to Android Developers → goo.gle/AndroidDevs
#Featured #Android #JetpackCompose

Пікірлер: 44
@AndroidDevelopers
@AndroidDevelopers 6 ай бұрын
Subscribe to Android Developers → goo.gle/AndroidDevs
@GsuegGeheh
@GsuegGeheh 3 ай бұрын
صوري شخصي
@GsuegGeheh
@GsuegGeheh 3 ай бұрын
صوري شخصية مهمة الصورة لرؤيتها بحجمها الأصلي الذي كان ‏‪3:40‬‏ ‏‪3:42‬‏ ‏‪3:43‬‏
@_zantetsuken_
@_zantetsuken_ 6 ай бұрын
Awesome presentation and amount of helpful information! Keep goin guys!
@AndroidDevelopers
@AndroidDevelopers 6 ай бұрын
Thank you for watching! We’re glad you found the video helpful.
@hellosagar
@hellosagar 5 ай бұрын
Loved it. Cant get it any better
@DanielJohnGay
@DanielJohnGay 3 ай бұрын
Thank you so much for the video! I always admire your company's products
@mark-147
@mark-147 6 ай бұрын
Outstanding comprehensive summary, but, my word, how many tools and dependencies to learn and use!?
@AlejandraStamato
@AlejandraStamato 6 ай бұрын
Amazing amazing! TY for all the tips! :)
@AndroidDevelopers
@AndroidDevelopers 6 ай бұрын
Thank you for watching! We’re glad you found the video helpful.
@ScanaRch
@ScanaRch 6 ай бұрын
Really awesome video! Thank you so much!
@AndroidDevelopers
@AndroidDevelopers 6 ай бұрын
Thank you! We appreciate the feedback.
@VIDEOSANDREEL
@VIDEOSANDREEL 6 ай бұрын
Better than i phone and so called other OS❤❤❤ Thank You for sharing 🙏 Love From INDIA Kolkata 🙏
@MhandeJack
@MhandeJack 6 ай бұрын
🔥
@nimishashiril
@nimishashiril 6 ай бұрын
Great…
@hasa4628
@hasa4628 5 ай бұрын
how to trace the rendering part of a composable method ?
@coldwised
@coldwised 3 ай бұрын
How to know when transition is finished with produceState? I'm talking about "Split heavy grames part".
@coldwised
@coldwised 3 ай бұрын
Ok, looks like he is not talking about animation transition
@yasserakbbach708
@yasserakbbach708 6 ай бұрын
I still didn't get how the recomposition is getting skipped by passing lambdas 🤔? Also, I'd like to mention that this video has too much info to handle, I hope next time you guys split it with enough examples 😄
@_zantetsuken_
@_zantetsuken_ 6 ай бұрын
The information amount is huge but incredibly helpful. The lambda is just a function which returns something. Due to the fact that the calculation isn't needed that early, the whole tree doesn't need to be recompositioned. Just where it needs to be.
@deepakbisht4957
@deepakbisht4957 6 ай бұрын
Those are not normal functions. They are composable functions. Internally they made these functions smart to recompose only those views whose state are changed...
@PedroBarbosaRoman
@PedroBarbosaRoman 5 ай бұрын
Regarding the defer reads: does it make sense to use lambdas if we are not using those deferred modifier alternatives or a custom layout?
@mlykotom
@mlykotom 4 ай бұрын
Maybe. It can still have positive effect if you invoke the lambda only in some small component on screen and thus only small part of the screen recomposes.
@PedroBarbosaRoman
@PedroBarbosaRoman 4 ай бұрын
​@@mlykotomOh I see, so the lambdas are a way to solve the problem of unnecessary recompositions when hoisting the state?
@mlykotom
@mlykotom 4 ай бұрын
Yes, exactly! :)
@amanxyz03
@amanxyz03 6 ай бұрын
👍🏻
@Shriramkrishnhari
@Shriramkrishnhari 6 ай бұрын
👍
@KeySabre
@KeySabre 5 ай бұрын
It's not easy for an existing app to use baseline profile. Gradle related setup is really frustrating.
@cameronbateau6510
@cameronbateau6510 Ай бұрын
What do you find that's not easy for an existing app to use baseline profile?
@TimRijckaert
@TimRijckaert 3 ай бұрын
I need an even more in depth tutorial for trying to find bottlenecks in an AndroidTV application which tend to run on slower/lower end Android devices. We have enough information how to capture logs, not how to interpret it. This video is the first which goes a bit more into depth, but I need a more general view, not just Compose
@cameronbateau6510
@cameronbateau6510 Ай бұрын
What in depth tutorial are you trying to find on an Android TV?
@user-ns3dw7rk2e
@user-ns3dw7rk2e 6 ай бұрын
My feeling is that if Jetpack Compose had been first, and now the view-based approach was released then the view-based approach would be considered a huge progress. Even now, after two years of JC release, if you make apps using JC, then the apps will have UI performance issues..
@FahadAyaz
@FahadAyaz 6 ай бұрын
Not necessarily. We're not seeing any performance issues in our app, even in the less performant debug mode. The point of the video is that if you do have issues, you know the steps to take to resolve them
@mr-turkish
@mr-turkish 6 ай бұрын
@@FahadAyaz This is the industry approach. The world started with View-based approach and discovered declarative approach (React, Vue, Swift UI, Jetpack Compose, etc.) to be much better.
@cameronbateau6510
@cameronbateau6510 Ай бұрын
How many performance issues give more attention to resolve?
@hasa4628
@hasa4628 5 ай бұрын
where is the recomposition state in debugger. it does not exist
@mlykotom
@mlykotom 4 ай бұрын
It's part of the regular debugger in Android Studio Hedgehog an newer.
@hasa4628
@hasa4628 4 ай бұрын
thank u @@mlykotom
@JohnPaulPhillips-qh9zq
@JohnPaulPhillips-qh9zq 5 ай бұрын
Not so easy to understand for beginners
@mondoshigua
@mondoshigua 6 ай бұрын
👋🏻🇨🇴🧔🏻👍🏻🤝🏻 Saludos desde Colombia,🕯️🕯️🕯️ feliz día de las velitas
@gofudgeyourselves9024
@gofudgeyourselves9024 5 ай бұрын
What is R8 on? How to enable it?
Performance best practices for Jetpack Compose
21:17
Android Developers
Рет қаралды 81 М.
Making apps blazing fast with Baseline Profiles
19:56
Android Developers
Рет қаралды 19 М.
When Jax'S Love For Pomni Is Prevented By Pomni'S Door 😂️
00:26
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 963 М.
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 35 МЛН
More performance tips for Jetpack Compose
20:47
Android Developers
Рет қаралды 37 М.
Performance Optimization with @Stable and @Immutable in Jetpack Compose
16:47
The Ultimate Package Structure Guide for Android Developers
12:10
Philipp Lackner
Рет қаралды 35 М.
Understanding Compose (Android Dev Summit '19)
36:15
Android Developers
Рет қаралды 71 М.
Custom layouts and graphics in Compose
20:25
Android Developers
Рет қаралды 48 М.
Clean Architecture with ASP.NET Core 8 | .NET Conf 2023
29:17
Simple Todo App  | Jetpack Compose 🚀 | Android Tutorial
18:08
Easy Tuto
Рет қаралды 4,4 М.
You're Collecting Your Flows Wrong In Compose | THIS Is Why
11:35
Philipp Lackner
Рет қаралды 26 М.
Непробиваемый телевизор 🤯
0:23
FATA MORGANA
Рет қаралды 419 М.
Main filter..
0:15
CikoYt
Рет қаралды 4,5 МЛН
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 5 МЛН
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 6 МЛН
Купил этот ваш VR.
37:21
Ремонтяш
Рет қаралды 207 М.