Performance best practices for Jetpack Compose

  Рет қаралды 85,468

Android Developers

Android Developers

Күн бұрын

Пікірлер: 61
@kenbX
@kenbX 2 жыл бұрын
Legends say that even to this day, Chuck is still waving to you. On a more serious note, great content, it was very helpful!
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
We're delighted that the tutorial was helpful to you, Ken! You can check out the Android Basics with Compose course here for even more Jetpack Compose fun: goo.gle/3V7Vlgg
@carapas_
@carapas_ 2 жыл бұрын
Very usefull video. Coming back here to watch some tricks again and again, so I decided to write some timecodes to help myself and maybe some of you too: 1:00 - Configuration 1:55 - Something to remember 3:57 - LazyList Key 5:47 - derivedStateOf 8:10 - Compose primary phases 9:57 - defer reading state 11:36 - Running backwards (Backwards write) 15:26 - Covering your bases (Baseline profiles)
@IncompleteTheory
@IncompleteTheory 2 жыл бұрын
More of this! This is extremely helpful. Personally I'd like more tips on to spot and avoid unnecessary recompositions.
@robchr
@robchr 2 жыл бұрын
I recommend looking at "composable metrics". Chris Banes has a blog post on it. It will generate a report on all your composable functions. Composable metrics tells you if a composable function is restartable and skippable. And if Compose can infer if an object is stable or immutable.
@IncompleteTheory
@IncompleteTheory 2 жыл бұрын
@@robchr Cheers for that pointer, this looks very interesting indeed.
@ketutsueca7535
@ketutsueca7535 2 жыл бұрын
🎊🎊🎊😣😣😣🎊🎊😣🎊😣😣🎊😣😣😣😣😣😣😣😣😣😣😣🎊🎊😣🎊😣🎊🎊🎊😣🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊😢😢🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢😢
@annacarolinasouza8693
@annacarolinasouza8693 2 жыл бұрын
@@robchr ⁹
@kasnadiwicaksono9292
@kasnadiwicaksono9292 2 жыл бұрын
@@robchr🐶🐶🐩🐩😃😃😃;-):-C-);-) bjjjjjcvbbvvvnjo🐶🐶🐶🐶🐶🐶🐶🐶🐶🐶
@KaranSharmak4c6
@KaranSharmak4c6 2 күн бұрын
Wow very nice video and love the comedy parts and the narration. So natural. Please keep making more videos like this.
@isaissb
@isaissb 2 жыл бұрын
Thank you for the Summary at the end.
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Glad it was helpful! 😁
@tomcully
@tomcully 2 жыл бұрын
This is really useful. Thanks!
@paulroos8517
@paulroos8517 Жыл бұрын
More of this, please. Something I have learned is one learns quite a lot about a new language/platform when one programs for performance.
@jaya-surya-t
@jaya-surya-t 2 жыл бұрын
This is a very helpful video for compose optimizations, appreciate it.
@СергейВыскребцев
@СергейВыскребцев 2 жыл бұрын
Very useful information!🙏🙏
@hocinehope8880
@hocinehope8880 Жыл бұрын
Thank you for this video and to the dev team, keep going, you are on the good way !
@Mrdresden
@Mrdresden 2 жыл бұрын
Great content! While watching this I was litterally dealing with startup jank, that is probably now just the JIT.
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
We're happy to hear this video helped! 😄
@theapache64
@theapache64 2 жыл бұрын
Thank you so much for this video! Enjoyed to the max
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
We're delighted to hear that you've enjoyed the tutorial. If you'd like to learn more about Jetpack Compose, please check out this resource: goo.gle/compose-pathway 🤩
@Daaaaaaavid
@Daaaaaaavid 2 жыл бұрын
The uggliest thing about Compose and which applies to each new stuff is when it allows you to do something which is not recommended to do.
@nikolayrogchev9628
@nikolayrogchev9628 Жыл бұрын
Amazing, short and on the point, keep up the good work
@VirgilioSolano
@VirgilioSolano Жыл бұрын
The most completely class about compose tricks... thank you so much :)
@oguzhanaslan494
@oguzhanaslan494 2 жыл бұрын
Great Presentation !!
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
We really appreciate your support! Thanks for watching 🙂
@minasmina2700
@minasmina2700 2 жыл бұрын
Is this information available in a blog post or in the compose documentation?
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Indeed it is! You can find the additional resources for this lesson here: JetPack Compose Performance → bit.ly/3xNSSwI Baseline Profiles → bit.ly/3tUmF5G Jetpack Compose Phases → bit.ly/39HNK5k
@hardlife507
@hardlife507 Жыл бұрын
This is good stuff. I owe you guys some ☕
@AndroidDevelopers
@AndroidDevelopers Жыл бұрын
Thanks for the coffee, Jerry! Have you checked out our Jetpack Compose walkthrough? You can learn more here: goo.gle/3MK5Xhy ☕
@CommanderSteps
@CommanderSteps 2 жыл бұрын
This helps a lot!
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Happy to hear the tutorial was helpful, Stefan! If you’re interested in additional resources, check out the Jetpack Compose walkthrough here: goo.gle/3p7WO7l
@nouwat
@nouwat 2 ай бұрын
Nice❤ 0:53
@arjunbhat6502
@arjunbhat6502 2 жыл бұрын
We want more of this from Engineers from inside.
@Maksim-8292
@Maksim-8292 Жыл бұрын
4:14 if item 5 and 4 are swapped, then only they should be recomposed, right? Items 1, 2,3, 6, 7 and subsequent items will keep their indexes which are used as keys. Do we need a LazyList Key in this case?
@GakisStylianos
@GakisStylianos 2 жыл бұрын
This was a really information dense video! But very well presented nonetheless
@anudeepananth
@anudeepananth 2 жыл бұрын
So the macrobenchmark library let's us see what the improvements might be for the user in the release build but does not guarantee it? And also we do not need to do anything to ensure baseline profiles are added to the app, it's added by default. Is that right?
@mohammadcs5708
@mohammadcs5708 2 жыл бұрын
Great
@AndroidDevelopers
@AndroidDevelopers Жыл бұрын
Thanks so much, Mohammad! Since you liked this video, come check out our Jetpack Compose playlist for more on this topic 😊
@gabdrn
@gabdrn 2 жыл бұрын
Simply awesome
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Right back at you.✨
@ВладимирХань-п6ч
@ВладимирХань-п6ч 2 жыл бұрын
hi Ben and Chuck!
@xpopcornx1747
@xpopcornx1747 2 жыл бұрын
Do you really need R8 enabled? Will Compose be slower without it than the xml view system?
@GakisStylianos
@GakisStylianos 2 жыл бұрын
Yes but you wouldn't ship your app without R8 in any case. For local development it's not such a huge deal
@jasvirsinghjasvirsingh9765
@jasvirsinghjasvirsingh9765 2 жыл бұрын
Good moreng
@FreedivingTrainer
@FreedivingTrainer 2 жыл бұрын
If I use Canvas(modifier = ..) in Compose and pass value which frequently changes, should I use drawBehind method? And how? Put Canvas in this method?
@TheAndreArtus
@TheAndreArtus 2 жыл бұрын
Depends on what you want it to change. If you are adding or removing sub-composables, or changing the size or layout then recomposition or layout will be triggered. In the case of the example only the color changed, everything else remained the same, so it only affected how the background was drawn (the function of drawBehind). Other functions, e.g. drawWithCache or drawWithContent, may be better suited to what you need. A good question to ask may be why the value frequently changes. E.g. a clock implementation may only need to redraw some aspects (text/hands) and the rest (ticks/frame/etc.) may be subject to caching.
@nayandhabarde
@nayandhabarde 2 жыл бұрын
Why was this not highlighted in first place
@dev_jeongdaeri
@dev_jeongdaeri 2 жыл бұрын
Wow
@mondoshigua
@mondoshigua Жыл бұрын
🙌🏻🇨🇴🧔🏻👍🏼🤝🏼 Saludos desde Colombia.
@tyronecarpenter3971
@tyronecarpenter3971 Жыл бұрын
0:48
@dimidbrodsky9523
@dimidbrodsky9523 2 жыл бұрын
How can i to hide a top bar(scaffold)? in specific screens
@dimidbrodsky9523
@dimidbrodsky9523 2 жыл бұрын
it destroyed my brain !
@dimidbrodsky9523
@dimidbrodsky9523 2 жыл бұрын
PLZ show a beautiful solution!
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Hello Dimid, please check here for more information regarding Material Components and layouts in Jetpack Compose: goo.gle/3IEPp8K
@farazahmed7
@farazahmed7 2 жыл бұрын
poor Chuck
@5erTurbo
@5erTurbo 2 жыл бұрын
Please don't make presentation code dark them and other stuff light theme
@esfandune_ir
@esfandune_ir 2 жыл бұрын
This is very useful. Thanks!
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Appreciate the feedback, Abbasali! Don't forget to subscribe for more 😎👍
Lazy layouts in Compose
24:32
Android Developers
Рет қаралды 93 М.
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 131 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 1,5 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
More performance tips for Jetpack Compose
20:47
Android Developers
Рет қаралды 40 М.
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 165 М.
State in Jetpack Compose
43:46
Android Developers
Рет қаралды 72 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,5 МЛН
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 1,1 МЛН
How to analyze and improve performance of your Jetpack Compose app
45:39
Android Developers
Рет қаралды 15 М.
Compose Modifiers deep dive
21:02
Android Developers
Рет қаралды 34 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,1 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 473 М.
Performance Optimization with @Stable and @Immutable in Jetpack Compose
16:47
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 131 МЛН