
Restartable: Meaning that this composable can serve as a restarting scope. This has implications for the Composable function, which is now marked as: The compiler reports will generate the results above for the StableComposable composable function.įirst off, you see that because the data class has all of its (in this case a single) parameters marked as stable, its runtime stability is deemed to be stable as well. Now, let's generate compiler reports for the example above and analyze the results: Let's create a stable class and Composable function like the example below: For now, you only need to care about the implications and not the mechanics, so you'll just analyze the results. Let's create pairs of classes and Composables and generate a Compose compiler report for them. If Compose is able to guarantee stability, it can grant certain performance benefits to a Composable, chiefly, it can mark it as skippable. Now let’s see how those stability types work with real-world examples. Since the data never changes, Compose can treat this as stable data.
FRAMEIO APP UPDATE
You can imagine that you should update entire items on RecyclerView when you need to update a single item. However, recomposing the entire UI tree and elements is expensive computations. Recomposition is the process of running your composable functions again from the Composition phase when the function’s inputs change. Drawing: UI elements will be drawn on a Canvas.Layout: Compose measure and commutates UI information on where to place the UI elements, for each node in the layout tree.Compose run composable functions and analyze your UI information.

Composition: This is the first phase of the rendering.Jetpack Compose renders a frame following the three distinct phases: If you want to learn more about the entire guidelines, check out Stream’s Compose SDK Guidelines.īefore you dive in, let's see how Jetpack Compose compiler renders UI elements in the runtime.
FRAMEIO APP HOW TO
In this article, you will learn about the overall rendering process of Jetpack Compose and how to optimize your app performance following Jetpack Compose guidelines that were built by Stream’s Compose team.

Jetpack Compose has a dedicated optimization system but it's essential to understand the rendering mechanism of Jetpack Compose for improving your app performance properly.
FRAMEIO APP CODE
According to Google’s What developers are saying, Jetpack Compose increases their productivity and code quality.

Since Google announced Jetpack Compose stable 1.0, many companies are getting started to adopt Jetpack Compose into their projects.
