Enhancing Jetpack Compose app performance

  Рет қаралды 28,042

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‬‏
@hellosagar
@hellosagar 6 ай бұрын
Loved it. Cant get it any better
@_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.
@DanielJohnGay
@DanielJohnGay 3 ай бұрын
Thank you so much for the video! I always admire your company's products
@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.
@mark-147
@mark-147 6 ай бұрын
Outstanding comprehensive summary, but, my word, how many tools and dependencies to learn and use!?
@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 ай бұрын
🔥
@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 5 ай бұрын
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 5 ай бұрын
​@@mlykotomOh I see, so the lambdas are a way to solve the problem of unnecessary recompositions when hoisting the state?
@mlykotom
@mlykotom 5 ай бұрын
Yes, exactly! :)
@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
@nimishashiril
@nimishashiril 6 ай бұрын
Great…
@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...
@amanxyz03
@amanxyz03 6 ай бұрын
👍🏻
@Shriramkrishnhari
@Shriramkrishnhari 6 ай бұрын
👍
@TimRijckaert
@TimRijckaert 4 ай бұрын
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 2 ай бұрын
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 2 ай бұрын
How many performance issues give more attention to resolve?
@KeySabre
@KeySabre 6 ай бұрын
It's not easy for an existing app to use baseline profile. Gradle related setup is really frustrating.
@cameronbateau6510
@cameronbateau6510 2 ай бұрын
What do you find that's not easy for an existing app to use baseline profile?
@hasa4628
@hasa4628 5 ай бұрын
where is the recomposition state in debugger. it does not exist
@mlykotom
@mlykotom 5 ай бұрын
It's part of the regular debugger in Android Studio Hedgehog an newer.
@hasa4628
@hasa4628 5 ай бұрын
thank u @@mlykotom
@JohnPaulPhillips-qh9zq
@JohnPaulPhillips-qh9zq 6 ай бұрын
Not so easy to understand for beginners
@mondoshigua
@mondoshigua 6 ай бұрын
👋🏻🇨🇴🧔🏻👍🏻🤝🏻 Saludos desde Colombia,🕯️🕯️🕯️ feliz día de las velitas
@gofudgeyourselves9024
@gofudgeyourselves9024 6 ай бұрын
What is R8 on? How to enable it?
Performance best practices for Jetpack Compose
21:17
Android Developers
Рет қаралды 81 М.
Inspecting Performance - MAD Skills
16:01
Android Developers
Рет қаралды 20 М.
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 16 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 45 МЛН
PINK STEERING STEERING CAR
00:31
Levsob
Рет қаралды 23 МЛН
Understanding Compose (Android Dev Summit '19)
36:15
Android Developers
Рет қаралды 71 М.
Debugging Jetpack Compose
21:27
Android Developers
Рет қаралды 23 М.
Introduction to drawing in Compose
9:29
Android Developers
Рет қаралды 41 М.
Making apps blazing fast with Baseline Profiles
19:56
Android Developers
Рет қаралды 19 М.
Type-Safe Navigation with the OFFICIAL Compose Navigation Library
10:03
5 Useful Python Decorators (ft. Carberra)
14:34
Indently
Рет қаралды 88 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
APPLE совершила РЕВОЛЮЦИЮ!
0:39
ÉЖИ АКСЁНОВ
Рет қаралды 3,6 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 1,3 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 3,5 МЛН