# Recomposition

Published articles for Recomposition.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Stop Ignoring Compose Stability (Yes, Even with Strong Skipping Mode)

DevFeed: [Stop Ignoring Compose Stability (Yes, Even with Strong Skipping Mode)](<https://devfeed.tech/articles/stop-ignoring-compose-stability-yes-even-with-strong-skipping-mode-25753.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/stop-ignoring-compose-stability-yes-even-with-strong-skipping-mode/>)

Author: Shreyas Patil

Published: 2026-08-03T04:30:00Z

Content type: article

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [compose-stability](<https://devfeed.tech/tags/compose-stability.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This article explains why Compose stability still matters when Strong Skipping Mode is enabled. It describes how unstable parameters are compared by instance equality, which can prevent composables from skipping and lead to unnecessary recompositions, and discusses automatic lambda memoization.

### Source excerpt

Strong Skipping Mode doesn't make Compose stability obsolete. Discover the hidden referential equality trap causing silent recompositions in your app.

## How Jetpack Compose builds and updates UI with modifiers

DevFeed: [How Jetpack Compose builds and updates UI with modifiers](<https://devfeed.tech/articles/understand-compose-in-3-minutes-39256.md>)

Original publisher: [Read original article](<https://kt.academy/article/compose_understand>)

Published: 2026-06-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [layout](<https://devfeed.tech/topics/layout.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how Jetpack Compose builds and updates user interfaces. It focuses on modifiers, layout measurement, drawing, semantics, user interactions, recomposition, and modifier node interfaces.

### Source excerpt

How Compose actually works? How it works under the hood and why it's so powerful.

## Introducing Dejavu: Recomposition Testing for Jetpack Compose

DevFeed: [Introducing Dejavu: Recomposition Testing for Jetpack Compose](<https://devfeed.tech/articles/introducing-dejavu-recomposition-testing-for-jetpack-compose-27344.md>)

Original publisher: [Read original article](<https://blog.mmckenna.me/introducing-dejavu>)

Author: Matt McKenna

Published: 2026-03-09T19:26:54Z

Content type: release

Language: en

Sources: [Matt McKenna](<https://devfeed.tech/sources/matt-mckenna.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>)

Tags: [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [diagnostics](<https://devfeed.tech/tags/diagnostics.md>), [error-messages](<https://devfeed.tech/tags/error-messages.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [testing](<https://devfeed.tech/tags/testing.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

The article introduces Dejavu, a testing tool for Jetpack Compose that turns recomposition behavior into test assertions. It describes asserting expected recomposition counts, receiving diagnostic information on failures, and using CompositionTracer without production-code instrumentation, a compiler plugin, bytecode manipulation, or a Gradle plugin.

### Source excerpt

Where This Idea Came From At Square, most of the app is built on Workflow. There is an internal testing framework that lets you assert exactly how many render passes are triggered for a given interact

## How Composition and Recomposition Work in Jetpack Compose

DevFeed: [How Composition and Recomposition Work in Jetpack Compose](<https://devfeed.tech/articles/you-don-t-understand-recomposition-39371.md>)

Original publisher: [Read original article](<https://kt.academy/article/recomposition>)

Published: 2026-02-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains composition and recomposition in Jetpack Compose, including how composables build a UI tree and how snapshot state triggers updates to the parts of the UI that read changed state.

### Source excerpt

Clear explanation of how composition and recomposition work in Jetpack Compose.

## Compose Stability Analyzer 0.7.0: Recomposition Cascade and Live Heatmap

DevFeed: [Compose Stability Analyzer 0.7.0: Recomposition Cascade and Live Heatmap](<https://devfeed.tech/articles/compose-stability-analyzer-0-7-0-recomposition-cascade-and-live-heatmap-25921.md>)

Original publisher: [Read original article](<https://proandroiddev.com/compose-stability-analyzer-0-7-0-recomposition-cascade-and-live-heatmap-6e8f789cd8ea?source=rss-9bb203a4ab2e------2>)

Author: Jaewoong Eum

Published: 2026-02-15T00:08:14Z

Content type: tutorial

Language: en

Sources: [Stories by Jaewoong Eum on Medium](<https://devfeed.tech/sources/stories-by-jaewoong-eum-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-stability](<https://devfeed.tech/tags/compose-stability.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This article introduces Compose Stability Analyzer 0.7.0, focusing on its Recomposition Cascade Visualizer and Live Recomposition Heatmap. It explains how the heatmap uses ADB-connected device events to display runtime recomposition counts in Android Studio.

### Source excerpt

Jetpack Compose's stability system determines whether a composable function can be skipped during recomposition. When all parameters are stable, Compose can compare them and skip the function entirely if nothing changed. When even one parameter is unstable, the composable must re-execute every time its parent recomposes. Understanding which composables are stable and which are not is the first step toward optimizing Compose performance, but it's not the whole picture. Compose Stability Analyzer has been providing real-time stability analysis directly in Android Studio through gutter icons, hover tooltips, inline hints, and code inspections. These features answer the question "is this composable stable?" at a glance. Version 0.7.0 goes further by answering two additional questions that static analysis alone cannot address: "what happens downstream when this composable recomposes?" and "which composables are actually recomposing the most on a real device?" In this article, you'll explore the two new features introduced in version 0.7.0: the Recomposition Cascade Visualizer and the Live Recomposition Heatmap. Live Recomposition Heatmap Static analysis tells you which composables could recompose unnecessarily. The Live Recomposition Heatmap tells you which ones actually are. It bridges runtime behavior with your IDE by reading @TraceRecomposition events from a connected device via ADB and displaying live recomposition counts directly above composable functions in the editor. To use the heatmap, you need the Compose Stability Analyzer Gradle plugin applied to your project, composable functions annotated with @TraceRecomposition, and logging enabled via ComposeStabilityAnalyzer.setEnabled(true) in your Application class. With those in place, open the Compose Stability Analyzer tool window and click the Start/Stop button in the title bar. If one device is connected, monitoring begins immediately. If multiple devices are connected, a picker popup lets you choose which one t

## How Compose Stability Affects Recomposition and Passing Types

DevFeed: [How Compose Stability Affects Recomposition and Passing Types](<https://devfeed.tech/articles/you-don-t-understand-stability-in-compose-39253.md>)

Original publisher: [Read original article](<https://kt.academy/article/compose-stability>)

Published: 2026-02-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [developers](<https://devfeed.tech/tags/developers.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This article explains how Compose stability affects recomposition and the safety of passing types through the UI tree. It distinguishes immutable, stable, and unstable types, emphasizing that some mutable types remain safe because Compose can observe their changes.

### Source excerpt

Deep dive into how Compose handles stability and why it's crucial for developers.

## Deep dive into annotations in Jetpack Compose

DevFeed: [Deep dive into annotations in Jetpack Compose](<https://devfeed.tech/articles/deep-dive-into-annotations-in-jetpack-compose-25711.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/deep-dive-into-annotations-in-jetpack-compose/>)

Author: Shreyas Patil

Published: 2025-05-19T05:16:29Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [app-development](<https://devfeed.tech/tags/app-development.md>), [compose](<https://devfeed.tech/tags/compose.md>), [deep](<https://devfeed.tech/tags/deep.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [examples](<https://devfeed.tech/tags/examples.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial explains how Jetpack Compose uses compiler annotations and runtime mechanisms such as recomposition, skipping, and restartability. It describes how these mechanisms affect composable execution and performance, with practical examples.

### Source excerpt

An extensive deep dive into annotations in Jetpack Compose. Understand how @Composable, @Stable, @ReadOnlyComposable, and others work under the hood.

## How Jetpack Compose Measuring Works

DevFeed: [How Jetpack Compose Measuring Works](<https://devfeed.tech/articles/how-jetpack-compose-measuring-works-15676.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/how-jetpack-compose-measuring-works>)

Author: Helios Alonso

Published: 2023-09-28T15:00:00Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [compose](<https://devfeed.tech/tags/compose.md>), [debug](<https://devfeed.tech/tags/debug.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [layout](<https://devfeed.tech/tags/layout.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [structure](<https://devfeed.tech/tags/structure.md>), [typography](<https://devfeed.tech/tags/typography.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial explains how Jetpack Compose measures and lays out UI. It presents Compose UI as an internally generated tree of nodes, describes the Layout method and its content lambda, measure policy, and modifiers, and outlines how measuring and drawing work.

### Source excerpt

A high level overview on producing custom rich UI in Compose

## Profiling and Optimization Techniques for Jetpack Compose Apps

DevFeed: [Profiling and Optimization Techniques for Jetpack Compose Apps](<https://devfeed.tech/articles/optimize-or-die-profiling-and-optimization-in-jetpack-compose-23910.md>)

Original publisher: [Read original article](<https://medium.com/icerock/optimize-or-die-profiling-and-optimization-in-jetpack-compose-a165c8897b3f?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:14:45Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Android](<https://devfeed.tech/topics/android.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [GPU](<https://devfeed.tech/topics/gpu.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This tutorial uses the Campus student schedule app to explain profiling and optimization techniques for Jetpack Compose. It covers excessive recompositions, Compose Compiler Metrics, CPU and GPU profiling, and Android Studio's Recomposition Counts tool.

### Source excerpt

Your brand-new app gets bombarded with user complaints on Google Play about it hanging or slowing down? Follow the tips in this article to fix it. Hello! My name is Sergey Panov, and I am a mobile developer at IceRock. Today, I will be using our Campus app as an example to demonstrate profiling and optimization techniques for Jetpack Compose. Campus is an app that allows students to view their class schedule. Its main feature is the schedule screen consisting of two pagers for weeks and days. When users tried to swipe them, it caused the app to hang, but we managed to fix it. Here are the topics discussed in the article: Recomposition Counts. Pinpointing Excessive Recompositions. Compose Compiler Metrics. Identifying the Root Causes of Excessive Recompositions. CPU Profiling. Finding "Hot" Methods and Freeing up the CPU. GPU Profiling. Learning Which Components Take a Long Time to Draw. More Tips on Fixing Bugs Identified with Profiling Tools. Recomposition Counts. Pinpointing Excessive Recompositions Issue. The first concept we need to highlight is that of recomposition. Rendering a screen in Compose consists of traversing the graph of composable functions. If a graph node changes its state (i.e. arguments of a composable method, values of MutableState or animations change), the subgraph is updated, that is, the functions are called again. Such an update is called a recomposition. Recompositions are fast and should not present any issues, but frequent recompositions can cause an app to slow down. This is a distinctive feature and a pitfall of Compose. After all, a developer can make some mistakes leading to excessive recompositions, for instance, recreate an object instead of reusing it. This results in unnecessary computations and performance issues. Solution. In large projects, these mistakes might be tricky to detect by the unaided eye, so Android Studio provides our eyes with an aid -- a tool called Recomposition Counts. It can be enabled in Layout Inspector to

## Leveraging the Snapshot Mutation Policies of Jetpack Compose

DevFeed: [Leveraging the Snapshot Mutation Policies of Jetpack Compose](<https://devfeed.tech/articles/leveraging-the-snapshot-mutation-policies-of-jetpack-compose-25735.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/leveraging-the-snapshot-mutation-policies-of-jetpack-compose/>)

Author: Shreyas Patil

Published: 2023-01-30T13:30:39Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [compose](<https://devfeed.tech/tags/compose.md>), [data-class](<https://devfeed.tech/tags/data-class.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [mutation](<https://devfeed.tech/tags/mutation.md>), [recompose](<https://devfeed.tech/tags/recompose.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [state](<https://devfeed.tech/tags/state.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A tutorial on SnapshotMutationPolicy in Jetpack Compose, explaining how structural, referential, and never-equal policies determine whether state changes trigger UI recomposition.

### Source excerpt

Understand Snapshot Mutation Policies in Jetpack Compose. Learn how to control when and how your UI recomposes based on state changes.

## Profiling and Optimizing Jetpack Compose Apps with Recomposition, CPU, and GPU Analysis

DevFeed: [Profiling and Optimizing Jetpack Compose Apps with Recomposition, CPU, and GPU Analysis](<https://devfeed.tech/articles/optimize-or-die-profiling-and-optimization-in-jetpack-compose-24587.md>)

Original publisher: [Read original article](<https://medium.com/icerock/optimize-or-die-profiling-and-optimization-in-jetpack-compose-a165c8897b3f?source=rss-2f461fccc401------2>)

Author: IceRock Development

Published: 2023-01-25T06:55:43Z

Content type: tutorial

Language: en

Sources: [Stories by IceRock Development on Medium](<https://devfeed.tech/sources/stories-by-icerock-development-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This tutorial demonstrates profiling and optimization techniques for Jetpack Compose using the Campus student-schedule app. It explains how to detect excessive recompositions with Recomposition Counts and Compose Compiler Metrics, then use CPU and GPU profiling to identify performance problems and slow-to-draw components.

### Source excerpt

Your brand-new app gets bombarded with user complaints on Google Play about it hanging or slowing down? Follow the tips in this article to fix it. Hello! My name is Sergey Panov, and I am a mobile developer at IceRock. Today, I will be using our Campus app as an example to demonstrate profiling and optimization techniques for Jetpack Compose. Campus is an app that allows students to view their class schedule. Its main feature is the schedule screen consisting of two pagers for weeks and days. When users tried to swipe them, it caused the app to hang, but we managed to fix it. Here are the topics discussed in the article: Recomposition Counts. Pinpointing Excessive Recompositions. Compose Compiler Metrics. Identifying the Root Causes of Excessive Recompositions. CPU Profiling. Finding "Hot" Methods and Freeing up the CPU. GPU Profiling. Learning Which Components Take a Long Time to Draw. More Tips on Fixing Bugs Identified with Profiling Tools. Recomposition Counts. Pinpointing Excessive Recompositions Issue. The first concept we need to highlight is that of recomposition. Rendering a screen in Compose consists of traversing the graph of composable functions. If a graph node changes its state (i.e. arguments of a composable method, values of MutableState or animations change), the subgraph is updated, that is, the functions are called again. Such an update is called a recomposition. Recompositions are fast and should not present any issues, but frequent recompositions can cause an app to slow down. This is a distinctive feature and a pitfall of Compose. After all, a developer can make some mistakes leading to excessive recompositions, for instance, recreate an object instead of reusing it. This results in unnecessary computations and performance issues. Solution. In large projects, these mistakes might be tricky to detect by the unaided eye, so Android Studio provides our eyes with an aid -- a tool called Recomposition Counts. It can be enabled in Layout Inspector to

## Performance in Jetpack Compose

DevFeed: [Performance in Jetpack Compose](<https://devfeed.tech/articles/performance-in-jetpack-compose-25901.md>)

Original publisher: [Read original article](<https://skyyo.medium.com/performance-in-jetpack-compose-9a85ce02f8f9?source=rss-56174fa84bcc------2>)

Author: Denys Rudenko

Published: 2022-10-03T16:41:03Z

Content type: tutorial

Language: en

Sources: [Stories by Denis Rudenko on Medium](<https://devfeed.tech/sources/stories-by-denis-rudenko-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [article](<https://devfeed.tech/tags/article.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [false-positive](<https://devfeed.tech/tags/false-positive.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [scopes](<https://devfeed.tech/tags/scopes.md>), [skip](<https://devfeed.tech/tags/skip.md>), [ui](<https://devfeed.tech/tags/ui.md>), [val](<https://devfeed.tech/tags/val.md>), [var](<https://devfeed.tech/tags/var.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

A practical guide to improving Jetpack Compose performance through stable parameters, skippable composables, optimized recompositions, remembered lambdas, and compiler and layout-inspector metrics.

### Source excerpt

Article tells about my research on how to write efficient Compose code. It consists of 6 sections and a TL;DR/Summary in the end. We will cover: Optimising recompositions When should you use @Immutable and @Stable annotations; Unstable classes, variables, lambdas; Non-restartable & skippable composables; Lambda modifiers; Passing lambdas providing required fields instead of fields in composables; Inlined composables; When you should use remember { }. We'll be using Compose Compiler Metrics and layout inspector tools to know: - If a class is stable or not; - If the composable function is skippable/restartable; - Amount of skipped recompositions. 1. Unstable objects on UI layer. To understand why we should care about stability, let us peek into a very important metric called skippability. It allows compose runtime to skip recomposition of a composable when all the parameters it uses are considered stable. What is considered stable by the compiler? - All primitive value types: Boolean, Int, Long, Float, Char, etc. - Strings - Lambdas (not always, we will get to it later) We want composable functions to use stable params to become skippable. 1) Don't use var when seeking stability. Fields declared as var are considered unstable: https://medium.com/media/724da23ba38eaa9d3312318e7e8038b9/hrefhttps://medium.com/media/f8dd8a39bce60e48b5ff8bdd4a02b9ef/href UserDetails composable will be recomposed even if the user never gets modified. Using val instead of var in User class will fix this issue. 2) Not all lambdas are considered stable. Let's look at the following examples: https://medium.com/media/fbbff417d165a501b21a3e5d2c6f087f/hrefhttps://medium.com/media/c6aaae01fda67c633edcdf7bb351e620/href Since the lambdas capture outside scopes, they won't be automatically inferred as stable and reused as expected. If the lambda requires access to external variables, the compiler will add those variables as fields, which are passed into the constructor of the lambda. We go a 2 ways of

## When Compose remember cannot forget

DevFeed: [When Compose remember cannot forget](<https://devfeed.tech/articles/when-compose-remember-cannot-forget-38653.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2022_07_23_when_compose_remember_cannot_forget/>)

Published: 2022-07-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [compose-for-web](<https://devfeed.tech/topics/compose-for-web.md>), [ui](<https://devfeed.tech/topics/ui.md>), [color](<https://devfeed.tech/topics/color.md>)

Tags: [change](<https://devfeed.tech/tags/change.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-for-web](<https://devfeed.tech/tags/compose-for-web.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

This tutorial explains why a Compose composable continued displaying an old value after recomposition in a Compose for Web color utility app. The issue occurred because remember preserves values across recompositions; supplying the changing color value as a key caused the remembered value to update.

### Source excerpt

Чытаць на беларускай мове Introduction When developing color-utils app using Compose for Web I faced an issue that remember didn't want to forget the state. It was quite annoying experience as it felt stupid: composable function is recomposed with the new value provided but remember still kept old value. As usual, there is no magic there and the answer is quite simple therefore this article won't be that long. Compose is all about state. In the app I had two levels of state:

## How to change system bar colors using Jetpack Compose

DevFeed: [How to change system bar colors using Jetpack Compose](<https://devfeed.tech/articles/how-to-change-system-bar-colors-using-jetpack-compose-37161.md>)

Original publisher: [Read original article](<https://arkadiuszchmura.com/posts/how-to-change-system-bar-colors-in-compose/>)

Published: 2022-07-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Arkadiusz Chmura](<https://devfeed.tech/sources/arkadiusz-chmura.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>), [XML](<https://devfeed.tech/topics/xml.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [changes](<https://devfeed.tech/tags/changes.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

This tutorial explains how to change Android status bar and navigation bar colors directly with Jetpack Compose, without modifying XML files. It shows how to use the activity's system bar properties and update icon appearance according to the dark theme.

### Source excerpt

System bar colors can be changed directly with Compose, without a need to modify any XML files.

## Keep your Tabs and List in sync using Jetpack Compose

DevFeed: [Keep your Tabs and List in sync using Jetpack Compose](<https://devfeed.tech/articles/keep-your-tabs-and-list-in-sync-using-jetpack-compose-23699.md>)

Original publisher: [Read original article](<https://engineering.theblueground.com/auto-sync-tabs-and-a-list-with-jetpack-compose/>)

Author: Vaios Tsitsonis

Published: 2022-06-20T12:15:00Z

Content type: tutorial

Language: en

Sources: [Blueground Engineering blog](<https://devfeed.tech/sources/blueground-engineering-blog.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Development](<https://devfeed.tech/topics/development.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [development](<https://devfeed.tech/tags/development.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [list](<https://devfeed.tech/tags/list.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial introduces Jetpack Compose and explains how to build a UI with grouped list items, synchronized tabs, scrolling behavior, and automatic navigation to corresponding groups. It also discusses Compose's Kotlin-based UI model, state handling, recomposition, and interoperability with the older UI system.

### Source excerpt

Jetpack Compose In May 2019, Google announced a new UI toolkit for Kotlin developers. In July 2021 the first stable version of this toolkit was made available. So, it is a fresh but I believe very promising toolkit. Some of the benefits of using the Jetpack Compose will be mentioned

## Exploring MovableContentOf in Jetpack Compose

DevFeed: [Exploring MovableContentOf in Jetpack Compose](<https://devfeed.tech/articles/exploring-movablecontentof-in-jetpack-compose-25778.md>)

Original publisher: [Read original article](<https://www.sinasamaki.com/exploring-movablecontentof-in-jetpack-compose/>)

Author: sinasamaki

Published: 2022-03-14T04:49:00Z

Content type: tutorial

Language: en

Sources: [sinasamaki](<https://devfeed.tech/sources/sinasamaki.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This tutorial explains Jetpack Compose's movableContentOf function, introduced in version 1.2.0-alpha03. It shows how moving composable content can avoid unnecessary recomposition, preserve state when items change position, and potentially improve performance.

### Source excerpt

Jetpack Compose recently introduced a new function named movableContentOfin version 1.2.0-alpha03. As the name suggests, this enables us to move around content without the need for recomposition. This could save time and increase performance if the recompositions are expensive and or numerous. Jetpack compose already has some

## How Compose Compiler Stability Annotations Affect Recomposition and UI Performance

DevFeed: [How Compose Compiler Stability Annotations Affect Recomposition and UI Performance](<https://devfeed.tech/articles/promise-compose-compiler-and-imply-when-you-ll-change-25741.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/promise-compose-compiler-and-imply-when-youll-change/>)

Author: Shreyas Patil

Published: 2022-03-10T12:42:38Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginner](<https://devfeed.tech/tags/kotlin-beginner.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial explains how Compose Compiler stability annotations, including @Stable and @Immutable, communicate guarantees about models and functions. These guarantees can help the compiler optimize recomposition and may improve UI performance, but violating them can cause undefined behavior.

### Source excerpt

Understand the Compose compiler's stability promises. Learn how @Stable and @Immutable impact recomposition and how to help the compiler optimize your UI.

## Fun with Compose: Bad UI in a Great Framework - Touchlab

DevFeed: [Fun with Compose: Bad UI in a Great Framework - Touchlab](<https://devfeed.tech/articles/fun-with-compose-bad-ui-in-a-great-framework-touchlab-38204.md>)

Original publisher: [Read original article](<https://touchlab.co/fun-with-compose-bad-ui-in-a-great-framework>)

Published: 2021-08-04T03:23:44Z

Content type: article

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [animations](<https://devfeed.tech/tags/animations.md>), [boilerplate](<https://devfeed.tech/tags/boilerplate.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

An exploration of Jetpack Compose that builds deliberately poor volume-control interfaces and reflects on the framework's development experience. The article highlights concise UI code, custom animations, reduced boilerplate, and lessons about state, mutation, and recomposition.

### Source excerpt

To celebrate Jetpack Compose finally hitting 1.0, I decided to bring back an old reddit trend of creating the absolute worst volume control UI possible.