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
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)
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.
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 🤩
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?
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?
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
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.
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