# Compose Compiler

A Kotlin compiler plugin that transforms @Composable functions and enables optimizations for Jetpack Compose.

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

## A Rough First Sketch of the Compose Runtime

DevFeed: [A Rough First Sketch of the Compose Runtime](<https://devfeed.tech/articles/a-rough-first-sketch-of-the-compose-runtime-133218.md>)

Original publisher: [Read original article](<https://www.grokkingandroid.com/a-rough-first-sketch-of-the-compose-runtime/>)

Author: Wolfram Rittmeyer

Published: 2026-11-13T10:26:08Z

Content type: article

Language: en

Sources: [Grokking Android](<https://devfeed.tech/sources/grokking-android.md>)

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

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [bridge](<https://devfeed.tech/tags/bridge.md>), [cache](<https://devfeed.tech/tags/cache.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-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [composer](<https://devfeed.tech/tags/composer.md>), [composition](<https://devfeed.tech/tags/composition.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [runtime](<https://devfeed.tech/tags/runtime.md>)

### AI overview

Compose's runtime links composable code to a UI tree and schedules updates when state changes. A Composition owns a Composer and an Applier; each call to setContent() creates a Composition. The Composer works with the SlotTable, whose groups and slots cache structure and values used to decide what to update or skip during recomposition. When the Snapshot system commits changes to mutable state, it notifies observers; the lifecycle-aware Recomposer then schedules needed recomposition on a frame clock. The Applier manages nodes and depends on their type: UI compositions commonly use UiApplier or DefaultUiApplier, while vectors and other environments can use different appliers. The Owner connects the runtime to the platform's view or controller system and handles events such as layout, invalidation, and accessibility. This is a high-level sketch; the author says detailed explanations are planned for later posts.

### Source excerpt

In my series about the inner workings of Jetpack Compose (or Compose Multiplatform), I repeatedly will mention certain parts of the runtime. While I will cover the most relevant parts in separate posts, I provide in this post a high-level view of things. It should help you understand the overall picture while my blog post [...] Continue Reading "A Rough First Sketch of the Compose Runtime" The post A Rough First Sketch of the Compose Runtime appeared first on Grokking Android.

## Inside Jetpack Compose's $changed Bit Field: Static Arguments and Fewer Runtime Comparisons

DevFeed: [Inside Jetpack Compose's $changed Bit Field: Static Arguments and Fewer Runtime Comparisons](<https://devfeed.tech/articles/inside-jetpack-compose-s-changed-bit-field-static-arguments-and-fewer-runtime-comparisons-129509.md>)

Original publisher: [Read original article](<https://proandroiddev.com/jetpack-compose-compiler-internals-24370c24a891?source=rss----c72404660798---4>)

Author: Ravi Rawal

Published: 2026-11-11T19:25:42Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Parameter](<https://devfeed.tech/topics/parameter.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [change-tracking](<https://devfeed.tech/tags/change-tracking.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [static](<https://devfeed.tech/tags/static.md>)

### AI overview

Jetpack Compose's compiler uses the synthetic `$changed` bitmask to reduce runtime parameter checks: it marks arguments proven static, such as literals, and propagates known change results from a parent composable to its child. Static arguments need neither a comparison nor a parameter-specific SlotTable entry for change detection; propagated results avoid repeating checks. Arguments whose state is uncertain still require `Composer.changed()` and prior-value bookkeeping. Staticness is distinct from stability and skippability: these optimizations reduce work involved in deciding whether to skip, but do not guarantee skipping or prevent recomposition triggered by state or other invalidations. Compiler metrics and reports can show static and certain arguments, though not every generated bit pattern. The described mask layout and implementation are internal and may vary by release.

### Source excerpt

A closer look at parameter-state encoding, compiler IR analysis, comparison propagation, SlotTable storage, and the optimizations that happen before recomposition decisions reach the runtime. Jetpack Compose doesn't need to compare every argument passed to every composable function. The compiler already knows that some arguments cannot change. Consider a simple composable: @Composable fun ProductCard( title: String, isAvailable: Boolean ) { ProductCardContent( title = title, isAvailable = isAvailable, maxLines = 2, showDivider = false ) } Four arguments are passed to ProductCardContent, but they don't all have the same characteristics. title and isAvailable originate from the parent composable's parameters. Their change status can potentially be inherited from the parent. maxLines and showDivider, on the other hand, are fixed expressions. There is no reason for the child composable to compare 2 against a previously stored 2, or false against a previously stored false. These expressions can be identified at compile-time by the Compose compiler and stored in a synthetic parameter of type integer called $changed. This means that the compiler doesn't just pass argument values. It passes information about those values. Understanding how this works will show us two very similar optimizations. Static argument elimination and comparison propagation. Both of which reduce the number of comparisons performed at runtime and the amount of storage space required in the SlotTable for detecting parameter changes. The implementation details below are based on the AndroidX Compose compiler source. The generated signatures and bit structure are an internal part of the compiler and therefore can vary between releases. 1. Why Compose needs a parameter change-tracking mechanism A composable function is not an ordinary function call from the runtime's perspective. Consider: @Composable fun UserProfile(name: String) { Text(text = name) } The compiler transforms composable functions to comm

## Improving the Smoothness of Android Compose Screens

DevFeed: [Improving the Smoothness of Android Compose Screens](<https://devfeed.tech/articles/improving-the-smoothness-of-android-compose-screens-100955.md>)

Original publisher: [Read original article](<https://proandroiddev.com/improving-the-smoothness-of-android-compose-screens-47607da631c8?source=rss----c72404660798---4>)

Author: rayford

Published: 2026-10-26T13:33:21Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Android](<https://devfeed.tech/topics/android.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Developer experience](<https://devfeed.tech/topics/developer-experience.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-compose](<https://devfeed.tech/tags/android-compose.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [compose-performance](<https://devfeed.tech/tags/compose-performance.md>), [ide](<https://devfeed.tech/tags/ide.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [monitor](<https://devfeed.tech/tags/monitor.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [monitoring-and-evaluation](<https://devfeed.tech/tags/monitoring-and-evaluation.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [performance](<https://devfeed.tech/tags/performance.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [screen](<https://devfeed.tech/tags/screen.md>), [skip](<https://devfeed.tech/tags/skip.md>), [stable](<https://devfeed.tech/tags/stable.md>), [state](<https://devfeed.tech/tags/state.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [triggers](<https://devfeed.tech/tags/triggers.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

Compose screen performance depends on how often recomposition is triggered, parameter stability, and where state changes occur in the UI hierarchy. Frequent state changes are identified as a common source of excessive recomposition; declaring unchanged values as `val` can help avoid unnecessary updates, and IDE plugins can expose composable parameter stability. To find changing values, Rebugger compares state and parameters during recomposition and logs differences. The excerpt then describes Compose Monitor, which injects monitoring into annotated composables at compile time: its Android ASM approach uses two bytecode passes but depends on compiler-generated patterns that may change and supports only Android. Its proposed Kotlin compiler IR approach inserts monitoring calls before function exits and is intended to support Kotlin versions 2.0 and later, with platform-specific compilation backends. The excerpt notes that IR plugin APIs differ across Kotlin versions.

### Source excerpt

As Android development moves from the legacy View system to Jetpack Compose, the more modern Compose approach brings a very different development experience. The two also differ substantially in their tooling and performance-tracking workflows. In addition to frame-rate monitoring, the View system commonly relies on ANR reports to identify problematic stack traces. Compose, however, updates the UI in response to data changes, so an ANR stack trace may not point to the code responsible for the issue. Factors That Affect Compose Screen Performance Compose keeps screen state in memory. When that state changes, it triggers recomposition of the corresponding parts of the UI. The following factors affect rendering performance: How frequently recomposition is triggered Whether method parameters are stable The UI hierarchy in which the state change is triggered Stability is one of the factors Compose uses to decide whether it can skip recomposition. In day-to-day development, declaring values that do not change as val can help avoid unnecessary state updates and recompositions. Open-source IDE plugins can also show whether parameters of composable functions are stable directly in the editor. Compose Stability Analyzer The most common cause of Compose performance issues is frequent state changes that trigger excessive recompositions. Identifying the frequently changing state is the key to finding the root cause. Monitoring Compose-Triggered UI Updates One approach is to collect all state and parameters, compare their values whenever a composable function recomposes, and print the differences to logcat. Tools such as Rebugger already provide this capability, with an IDE plugin that can add the monitoring code. GitHub - theapache64/rebugger: A simple Compose Multiplatform library designed to print the reason for recomposition in your console/Logcat window." Minimizing Intrusion by Injecting Monitoring Code Automatically Most of the time, state changes do not need to be monitor

## 14 October 2026 Artifact Wave

DevFeed: [14 October 2026 Artifact Wave](<https://devfeed.tech/articles/14-october-2026-artifact-wave-87230.md>)

Original publisher: [Read original article](<https://commonsware.com/blog/2026/10/14/jetpack-artifact-wave.html>)

Author: CommonsWare

Published: 2026-10-14T22:23:01Z

Content type: release

Language: en

Sources: [The CommonsBlog](<https://devfeed.tech/sources/the-commonsblog.md>)

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

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [android](<https://devfeed.tech/tags/android.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [blog](<https://devfeed.tech/tags/blog.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [keep](<https://devfeed.tech/tags/keep.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [october](<https://devfeed.tech/tags/october.md>), [october-2026](<https://devfeed.tech/tags/october-2026.md>), [paging](<https://devfeed.tech/tags/paging.md>), [patch](<https://devfeed.tech/tags/patch.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [releases](<https://devfeed.tech/tags/releases.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

### AI overview

The October 14 Jetpack artifact update introduces the androidx.annotation.keep artifact group, including Gradle plugins and multiplatform libraries at version 1.0.0-alpha01. It also reports more than 150 other artifact updates, including a DataStore release candidate and patch releases for Paging and Tracing.

### Source excerpt

Here is what we got as new Jetpack artifacts this week!

## 7 October 2026 Artifact Wave

DevFeed: [7 October 2026 Artifact Wave](<https://devfeed.tech/articles/7-october-2026-artifact-wave-77041.md>)

Original publisher: [Read original article](<https://commonsware.com/blog/2026/10/07/jetpack-artifact-wave.html>)

Author: CommonsWare

Published: 2026-10-07T20:23:18Z

Content type: news

Language: en

Sources: [The CommonsBlog](<https://devfeed.tech/sources/the-commonsblog.md>)

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

Tags: [beta](<https://devfeed.tech/tags/beta.md>), [blog](<https://devfeed.tech/tags/blog.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [release](<https://devfeed.tech/tags/release.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [stable](<https://devfeed.tech/tags/stable.md>)

### AI overview

This week's Jetpack update includes more than 400 new artifact versions, the first beta of Compose 1.13, and a stable navigationevent release. No new artifacts or artifact groups were reported.

### Source excerpt

Here is what we got as new Jetpack artifacts this week!

## 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: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>)

Tags: [android](<https://devfeed.tech/tags/android.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](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recompose](<https://devfeed.tech/tags/recompose.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

Strong Skipping Mode, enabled by default in the Compose Compiler since Kotlin 2.0.20, makes restartable composables skippable even when they have unstable parameters and automatically memoizes lambdas, including those capturing unstable values. But skipping still depends on parameter comparisons: the excerpt says unstable parameters are compared by instance equality, and ends before explaining the stable-parameter comparison. Thus, enabling Strong Skipping alone does not guarantee that a composable with unstable inputs will skip when expected; the article frames stability as still relevant to avoiding unnecessary recompositions.

### Source excerpt

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

## Announcing Jetpack Compose Mechanisms: The Book and Course on How Compose Actually Works

DevFeed: [Announcing Jetpack Compose Mechanisms: The Book and Course on How Compose Actually Works](<https://devfeed.tech/articles/announcing-jetpack-compose-mechanisms-the-book-and-course-on-how-compose-actually-works-25925.md>)

Original publisher: [Read original article](<https://skydoves.medium.com/announcing-jetpack-compose-mechanisms-the-book-and-course-on-how-compose-actually-works-23f5c29016a9?source=rss-9bb203a4ab2e------2>)

Author: Jaewoong Eum

Published: 2026-06-21T01:38:50Z

Content type: article

Language: en

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

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

Tags: [added](<https://devfeed.tech/tags/added.md>), [android](<https://devfeed.tech/tags/android.md>), [android-compose](<https://devfeed.tech/tags/android-compose.md>), [book](<https://devfeed.tech/tags/book.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-ui](<https://devfeed.tech/tags/compose-ui.md>), [course](<https://devfeed.tech/tags/course.md>), [has](<https://devfeed.tech/tags/has.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

The excerpt explains how Compose turns a `@Composable` function into a function with a `Composer` and change-tracking parameter, wraps it in a restart group, and may skip its body when inputs have not changed. It also describes `remember` as storing values in the runtime's flat slot table: a cursor restores them by position on later compositions. This explains why a value survives recomposition while its slot remains in place, but is lost when the table is rebuilt after a configuration change or when its conditional branch stops running. The excerpt introduces a book and companion course but does not provide enough detail to summarize their contents.

### Source excerpt

You hit a recomposition that made no sense. You opened the function, read it twice, and still could not see why it ran again. Maybe you added a remember, shuffled a parameter, and it went away, and you never learned why. Every Compose developer has lived some version of that moment. This post is about the question you quietly moved past: what is actually happening under that @Composable function? In this article, you'll look at three of those puzzles up close, the function that is not the function you wrote, a value that survives by position, and a screen that looks clean while it burns frames. Then you'll see what the book built to answer them covers across its four parts, and how the companion course turns that reading into practice. The gap between using and understanding Most developers know how to use Compose. Far fewer know what runs underneath a @Composable function, and that gap stays invisible until the day a screen recomposes more than it should, a type refuses to skip, or a list drops frames during a scroll. At that point the usual advice runs out, and you are left guessing at a system you cannot see. Here is the kind of thing worth being able to see. You write this: https://medium.com/media/24487ffb0b09b137a227ad928968b886/href The compiler rewrites the signature to fun Greeting(name: String, $composer: Composer?, $changed: Int), wraps the body in a restart group, and adds a skip check that can bypass the entire function when name has not changed since the last composition. Every part of that rewrite has a reason. Once you can read the output, recomposition stops being something that happens to you and becomes something you can trace. Where does a remembered value actually go? You call remember { mutableStateOf(0) } dozens of times a day and trust that the value comes back. But where does it actually go? Not into a variable, not into a map, not into a field on your composable. https://medium.com/media/c6aa8065dea93696c4a4bb2e7bbb27ee/href Because remembe

## Jetpack Compose Hot Reload on Real Android Devices: Reduce the Build Time to Seconds

DevFeed: [Jetpack Compose Hot Reload on Real Android Devices: Reduce the Build Time to Seconds](<https://devfeed.tech/articles/jetpack-compose-hot-reload-on-real-android-devices-reduce-the-build-time-to-seconds-25923.md>)

Original publisher: [Read original article](<https://proandroiddev.com/jetpack-compose-hot-reload-on-real-android-devices-with-compose-hotswan-2f5dfccd55bf?source=rss-9bb203a4ab2e------2>)

Author: Jaewoong Eum

Published: 2026-03-31T02:51:42Z

Content type: article

Language: en

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

Topics: [compose-hot-reload](<https://devfeed.tech/topics/compose-hot-reload.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Android](<https://devfeed.tech/topics/android.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>)

Tags: [all](<https://devfeed.tech/tags/all.md>), [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [app](<https://devfeed.tech/tags/app.md>), [applying](<https://devfeed.tech/tags/applying.md>), [article](<https://devfeed.tech/tags/article.md>), [build](<https://devfeed.tech/tags/build.md>), [building](<https://devfeed.tech/tags/building.md>), [can](<https://devfeed.tech/tags/can.md>), [capabilities](<https://devfeed.tech/tags/capabilities.md>), [change](<https://devfeed.tech/tags/change.md>), [changes](<https://devfeed.tech/tags/changes.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-hot-reload](<https://devfeed.tech/tags/compose-hot-reload.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [devices](<https://devfeed.tech/tags/devices.md>), [hot-reloading](<https://devfeed.tech/tags/hot-reloading.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [reduce](<https://devfeed.tech/tags/reduce.md>), [reload](<https://devfeed.tech/tags/reload.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

Compose HotSwan is described as an Android Studio/IntelliJ and Gradle plugin that applies many Jetpack Compose code changes to a running physical device or emulator in about one to three seconds while preserving app state. Its pipeline incrementally compiles changed code, extracts modified classes from DEX, swaps method bodies through a native ART agent, and triggers scoped recomposition. The article says composable bodies, added/reordered composables, non-composable method bodies, and changes to existing resource values can reload; adding new resource keys requires a full rebuild. ART prevents runtime changes to class structure, so removing data class properties or changing their types also requires rebuilding. Setup requires Android Studio Meerkat 2024.3 or later, the Gradle plugin, a debug build, and a running device or emulator; API 30+ supports a broader range of changes. The plugin offers a two-week free trial.

### Source excerpt

Upsplash@lenaborge In Jetpack Compose development, you are probably rebuilding your app tens of times per day to adjust the subtle design specifications. Each rebuild takes anywhere from 1 min to several minutes (~30 mins depending on your project scale), followed by navigating back to the screen you were working on and reconstructing the state you just lost for fair self-testing. Let's be honest. That adds up to one to two hours of dead time per day, every day, spent waiting instead of iterating. Well, for some, it's the perfect coffee break. For others, it's a frustrating blocker that slows everything down. That's exactly the problem Compose HotSwan is built to solve. Compose HotSwan is a JetBrains IDE plugin for Android Studio/IntelliJ and a Gradle compiler plugin that performs Jetpack Compose hot reload on real physical Android devices/emulators, applying code changes to a running app in one to three seconds with full state preservation as possible. In this article, you will explore what you can do with Compose HotSwan, the engineering constraints that make hot reload on Android difficult, how Compose HotSwan works within those constraints, and its core capabilities. The build tax: What slow feedback actually costs you Every Android developer knows the routine. You tweak a modifier, hit run, and wait. The build compiles, dexes, installs, and restarts your app. It launches from the home screen. You tap through multiple screens, scroll to the right position, and recreate the state just to see a one-line change. This is not just an inconvenience. It changes how you make decisions, and the cost compounds throughout your day. Picture this. You are working on a screen buried several layers deep. Everything is set up exactly where you need it. You change fontSize = 16.sp to 18.sp. Gradle starts building. On a small project, it takes a minute. On a large codebase, it takes much longer. The app reinstalls and restarts from the "home screen". All your state is gone. Now y

## 🎅 Big Xmas discounts for Jetpack Compose Internals (book+course) and The Manifest Android Interivew

DevFeed: [🎅 Big Xmas discounts for Jetpack Compose Internals (book+course) and The Manifest Android Interivew](<https://devfeed.tech/articles/big-xmas-discounts-for-jetpack-compose-internals-book-course-and-the-manifest-android-interivew-37910.md>)

Original publisher: [Read original article](<https://newsletter.jorgecastillo.dev/p/big-xmas-discounts-for-jetpack-compose>)

Author: Jorge Castillo

Published: 2025-12-22T11:38:29Z

Content type: article

Language: en

Sources: [Effective Android](<https://devfeed.tech/sources/effective-android.md>)

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

Tags: [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>)

### AI overview

A promotional article announcing Christmas discounts for a Jetpack Compose internals book and cohort course, alongside The Manifest Android Interview book. It describes the Compose materials as covering Compose internals, the compiler, runtime, and client-library creation.

### Source excerpt

It's that time of the year again 🥳 let's celebrate together

## 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: article

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 Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [app-development](<https://devfeed.tech/tags/app-development.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [independent](<https://devfeed.tech/tags/independent.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>), [parameter](<https://devfeed.tech/tags/parameter.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [scope](<https://devfeed.tech/tags/scope.md>), [skip](<https://devfeed.tech/tags/skip.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

Jetpack Compose tracks which composables read changed state and recomposes the affected functions. It can skip a composable and its children when inputs are unchanged, provided the composable's parameters are stable and it meets the stated eligibility conditions. Restartable composables establish their own restart scope, allowing Compose to re-invoke them independently when state they read changes. The excerpt ends before explaining the annotations named in the source summary, so their behavior and usage cannot be described from the available text.

### Source excerpt

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

## Journey to K2: using the New Compiler in Apollo Kotlin

DevFeed: [Journey to K2: using the New Compiler in Apollo Kotlin](<https://devfeed.tech/articles/journey-to-k2-using-the-new-compiler-in-apollo-kotlin-23435.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/journey-to-k2-using-the-new-compiler-in-apollo-kotlin>)

Author: Benoit Lubek

Published: 2024-06-19T08:26:00Z

Content type: article

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [build-performance](<https://devfeed.tech/tags/build-performance.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [improvement](<https://devfeed.tech/tags/improvement.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration](<https://devfeed.tech/tags/migration.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [rewrite](<https://devfeed.tech/tags/rewrite.md>)

### AI overview

Apollo Kotlin's migration to K2 involved maintaining changes on a dedicated branch while the project was not yet buildable, then merging non-breaking changes to keep the final diff small. K2 exposed code that needed adjustment, alongside a few compiler bugs; the team worked through issues across beta and release candidate versions, and reports that those issues were fixed or had workarounds in Kotlin 2 stable. The Compose compiler moved into the Kotlin repository, and a Gradle plugin now automatically selects its version. The excerpt ends before the K1/K2 build-time comparison is complete, so it does not establish the performance improvement.

### Source excerpt

Apollo Kotlin is now built with K2, the new compiler that has recently been released with Kotlin 2. Here are a few details on the migration process. What is K2? K2 is a complete rewrite of the Kotlin compiler frontend, " the part of the compiler that parses your code and performs the semantic analysis, data flow analysis, call resolution, and type inference " (source). The result is a faster, more robust and reliable compiler that should also be easier to evolve in the future.

## Effortless Compose Compiler report analysis

DevFeed: [Effortless Compose Compiler report analysis](<https://devfeed.tech/articles/effortless-compose-compiler-report-analysis-25716.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/effortless-compose-compiler-report-analysis/>)

Author: Shreyas Patil

Published: 2024-05-20T12:30:51Z

Content type: tutorial

Language: en

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

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

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [cli](<https://devfeed.tech/tags/cli.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [diagnose](<https://devfeed.tech/tags/diagnose.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [guide](<https://devfeed.tech/tags/guide.md>), [html](<https://devfeed.tech/tags/html.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [large](<https://devfeed.tech/tags/large.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [performance](<https://devfeed.tech/tags/performance.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [report](<https://devfeed.tech/tags/report.md>), [reports](<https://devfeed.tech/tags/reports.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

The described Gradle plugin parses Jetpack Compose compiler reports and metrics into an HTML report, highlighting composable functions and classes it identifies as problematic or non-problematic. After adding the plugin to a module's Gradle file and syncing, generated tasks correspond to project variants and build types; running a task produces the report. The underlying compiler reports include function properties such as restartability, skippability, inline status, and parameter stability. The excerpt also mentions a CLI utility, but gives no details about its use.

### Source excerpt

A guide to analyzing Jetpack Compose compiler reports easily. Learn how to diagnose stability and skippability of your composables for better performance.

## Optimize or Die. Profiling and Optimization in Jetpack Compose

DevFeed: [Optimize or Die. Profiling and Optimization in Jetpack Compose](<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: article

Language: en

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

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [GPU rendering](<https://devfeed.tech/topics/gpu-rendering.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [class](<https://devfeed.tech/topics/class.md>), [constraintlayout](<https://devfeed.tech/topics/constraintlayout.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>), [jetpack](<https://devfeed.tech/tags/jetpack.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

The Campus schedule screen stuttered during swipes; profiling exposed excessive recompositions and costly drawing work. The article recommends using Android Studio Layout Inspector's Recomposition Counts to locate frequently rerun composables, then Compose Compiler Metrics to inspect stability and skippability. It traces further recompositions to unstable inputs, collections, and recreated lambdas, and describes remedies including immutable types and collections, method references, and remembered lambdas. CPU profiling identified repeated SimpleDateFormat creation inside WeekPage's loop; moving it out and using remember reduced the reported draw time from about 95 ms to 60-70 ms. GPU profiling compares frame bars with the 16.67 ms target and can point to slow list updates, layout/measure work, or input and animation handling. The article also advises using remember for values that must survive recomposition, reserving lazy layouts for cases that need them, and preferring Row or Column over ConstraintLayout where possible.

### 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

## Optimize or Die. Profiling and Optimization in Jetpack Compose

DevFeed: [Optimize or Die. Profiling and Optimization in Jetpack Compose](<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: [IceRock Development](<https://devfeed.tech/sources/stories-by-icerock-development-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [GPU rendering](<https://devfeed.tech/topics/gpu-rendering.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [class](<https://devfeed.tech/topics/class.md>), [constraintlayout](<https://devfeed.tech/topics/constraintlayout.md>), [Google Play](<https://devfeed.tech/topics/google-play.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>), [bugs](<https://devfeed.tech/tags/bugs.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [jetpack](<https://devfeed.tech/tags/jetpack.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>), [optimize](<https://devfeed.tech/tags/optimize.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [schedule](<https://devfeed.tech/tags/schedule.md>), [swipe](<https://devfeed.tech/tags/swipe.md>)

### AI overview

In the Campus schedule screen, swiping caused hangs; the article traces performance costs to repeated recompositions and expensive drawing work, then demonstrates profiling and fixes. Layout Inspector's Recomposition Counts identified ScheduleDayPage and RemoteStateContent recomposing three times per swipe. Compose Compiler Metrics exposed an unstable RemoteState argument; the article recommends stability annotations only when types truly cannot change, immutable collections for list stability, and remembered lambdas or method references to reduce recreated callbacks. CPU profiling found WeekPage spending about 95 ms in a four-second sample, partly because it created SimpleDateFormat inside a loop; moving and remembering that formatter reduced the reported draw time to 60-70 ms. GPU profiling compares frame bars with the 16.67 ms target and helps locate slow list updates, layout/measurement, animation, and input work. The excerpt also recommends remembering values across recompositions and using lazy layouts only when warranted.

### 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: article

Language: en

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

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Closure](<https://devfeed.tech/topics/closure.md>), [inlining](<https://devfeed.tech/topics/inlining.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>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.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>), [research](<https://devfeed.tech/tags/research.md>), [skip](<https://devfeed.tech/tags/skip.md>), [stable](<https://devfeed.tech/tags/stable.md>), [val](<https://devfeed.tech/tags/val.md>), [var](<https://devfeed.tech/tags/var.md>)

### AI overview

Compose can skip recomposition when a composable's parameters are considered stable. The excerpt says primitives and strings are stable, while mutable `var` fields make a class unstable; replacing them with `val` can allow a composable such as `UserDetails` to be skipped when its user has not changed. Lambdas that capture external variables may also be unstable because those variables become fields of the lambda. For simple cases, the article recommends references; for more involved lambdas, explicitly remembering them can reuse the same instance across recompositions. It says Compose Compiler Metrics and the layout inspector are used to inspect stability, restartability, skippability, and skipped recompositions. The excerpt begins discussing classes from non-Compose modules or libraries but cuts off before explaining that case or the article's other listed topics.

### 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

## Comparing Jetpack Compose performance with XML

DevFeed: [Comparing Jetpack Compose performance with XML](<https://devfeed.tech/articles/comparing-jetpack-compose-performance-with-xml-37398.md>)

Original publisher: [Read original article](<https://medium.com/okcredit/comparing-jetpack-compose-performance-with-xml-9462a1282c6b?source=rss----40ea5327aac7---4>)

Author: Pratham Arora

Published: 2022-08-09T05:41:24Z

Content type: comparison

Language: en

Sources: [OkCredit](<https://devfeed.tech/sources/okcredit-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [XML](<https://devfeed.tech/topics/xml.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>), [compose-performance](<https://devfeed.tech/tags/compose-performance.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [performance](<https://devfeed.tech/tags/performance.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

In production builds with R8 and Compose 1.1.0, an A/B test of one transaction screen found Compose had fewer slow frames than XML (8.91% vs. 9.93%) but more frozen frames (0.044% vs. 0.034%) and took about 2.5 times as long to draw its first frame. A follow-up test suggests prior loading of Compose components improved the observed screen's performance: the excerpt reports roughly 70% fewer frozen frames and 35% shorter median page load duration after preloading, though it omits the individual second-experiment measurements. The authors attribute the initial delay to Compose components being compiled just in time and ART pre-compiling them for later use. Frame durations were measured with FrameMetricsAggregator; frozen frames were 700 ms or more and slow frames 16 ms or more.

### Source excerpt

As Jetpack compose is progressing towards stability, our team decided to measure the performance differences between Compose and XML-based layouts to build the foundation for gradually moving towards Jetpack compose. The differences were measured in terms of frozen frames, slow frames and page load duration. Additionally, we deep-dived into how Android Runtime (ART) optimises the performance by using Ahead-of-time (AOT) compilation. Both the below-mentioned experiments were performed on Production build with R8 enabled. Compose version used throughout was 1.1.0 Let's get started... Experiment -- 1 To begin with, we decided to convert one of the existing screens from XML to compose. Then, using our internal A/B experimentation platform, we made 2 equal cohorts/groups of users. The first cohort would experience the old XML-based screen whereas the other cohort would experience the newly compose built screen. Aim -- To understand the rendering performance of both the screens by comparing frozen frame rate, slow frame rate and page load duration. Screen -- This screen shows all the transactions as well as their summary in an interval. Results - Frozen frame percentage: For compose-based layout, the frozen frame rate came out to be 0.044% whereas it was 0.034% for XML-based layout. An alternate way to understand this can be, that if we open this XML-based activity, then nearly 3.4 frames out of 10,000 frames would fall under the frozen frame category. Similarly, for the compose-based activity, it would be 4.3 frames out of 10,000 frames. Slow frame percentage: For compose-based layout, the slow frame rate came out to be 8.91% whereas it was 9.93% for XML-based layout. Like frozen frames, ~10 out of 100 frames would fall under the slow frame category for XML-based layout. Whereas it was ~9 out of 100 frames for compose-based activity. Median Page Load Duration (in milliseconds): Internally, we define page load duration as the time taken from launching an activity to drawing it

## Composable functions and return types

DevFeed: [Composable functions and return types](<https://devfeed.tech/articles/composable-functions-and-return-types-22652.md>)

Original publisher: [Read original article](<https://www.valueof.io/blog/compose-composable-return-types>)

Author: James Shvarts

Published: 2022-05-21T17:51:19Z

Content type: article

Language: en

Sources: [Android Blog - Mobile Dev Notes](<https://devfeed.tech/sources/android-blog-mobile-dev-notes.md>)

Topics: [function](<https://devfeed.tech/topics/function.md>), [factory function](<https://devfeed.tech/topics/factory-function.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [factory](<https://devfeed.tech/tags/factory.md>), [factory-function](<https://devfeed.tech/tags/factory-function.md>), [functions](<https://devfeed.tech/tags/functions.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [return](<https://devfeed.tech/tags/return.md>), [types](<https://devfeed.tech/tags/types.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

Composable functions that emit UI conventionally return Unit and use PascalCase names. They build a representation of UI state for the composition tree; because they may recompose, the excerpt says they should be idempotent and free of side effects. Composable factory functions instead return a value and do not emit UI; they are conventionally lower camel case and are usually called from UI-emitting composables. The excerpt notes that factories can use composition lifecycle and inputs such as remember, and gives a coroutine-scope example whose name indicates it is remembered before return. The text is incomplete, so further details and the full cancellation behavior are unavailable.

### Source excerpt

Exploring composable function characteristics and return types

## Diving into Mosaic for Jetpack Compose

DevFeed: [Diving into Mosaic for Jetpack Compose](<https://devfeed.tech/articles/diving-into-mosaic-for-jetpack-compose-27466.md>)

Original publisher: [Read original article](<https://jorgecastilloprz.github.io/diving-into-mosaic>)

Author: Jorge Castillo

Published: 2022-04-26T12:00:00Z

Content type: article

Language: en

Sources: [Jorge Castillo](<https://devfeed.tech/sources/jorge-castillo.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [client library](<https://devfeed.tech/topics/client-library.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>)

Tags: [2022](<https://devfeed.tech/tags/2022.md>), [case-study](<https://devfeed.tech/tags/case-study.md>), [client-library](<https://devfeed.tech/tags/client-library.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [library](<https://devfeed.tech/tags/library.md>), [overview](<https://devfeed.tech/tags/overview.md>), [runtime](<https://devfeed.tech/tags/runtime.md>)

### AI overview

Mosaic shows how a client library can use the Jetpack Compose compiler and runtime to build console UI. Its `TextNode` and `BoxNode` represent text and row or column containers; each node measures, lays out, and renders itself. A `MosaicNodeApplier` builds and updates the tree by delegating child insertions, removals, and moves to the nodes. `runMosaic` creates the root, `Recomposer`, and `Composition`, then drives recomposition with a coroutine context, `BroadcastFrameClock`, and a loop that sends frames and renders output when requested. A global snapshot write observer also enables state changes outside snapshots to trigger notifications. The excerpt's counter example updates Compose state every 250 ms, with the UI recomposing to reflect it. Mosaic is presented as a case study; the excerpt does not cover all library details.

### Source excerpt

Overview on how to create a client library for the Compose compiler and runtime.

## Promise compose compiler and imply when you'll change 🤞

DevFeed: [Promise compose compiler and imply when you'll change 🤞](<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: article

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 Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [mobile-app-performance](<https://devfeed.tech/topics/mobile-app-performance.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [annotations](<https://devfeed.tech/tags/annotations.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [composition](<https://devfeed.tech/tags/composition.md>), [invariants](<https://devfeed.tech/tags/invariants.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginner](<https://devfeed.tech/tags/kotlin-beginner.md>), [model](<https://devfeed.tech/tags/model.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [performance](<https://devfeed.tech/tags/performance.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [stable](<https://devfeed.tech/tags/stable.md>), [ui](<https://devfeed.tech/tags/ui.md>), [undefined-behavior](<https://devfeed.tech/tags/undefined-behavior.md>)

### AI overview

The excerpt explains that Compose may recompose a function when its parameters change, and that stability annotations communicate assumptions the compiler can use for optimizations. @Immutable promises that an object's properties will not change after construction; the text says it is appropriate when public fields are immutable and their types are primitive or immutable. @Stable promises consistent results for the same instances, notification when a public property changes, and stable public property types. These promises only support the described optimizations when their assumptions hold; violating them can cause undefined behavior. The excerpt ends before completing its guidance on when to use @Stable.

### 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.

## Jetpack Compose -- Before and after

DevFeed: [Jetpack Compose -- Before and after](<https://devfeed.tech/articles/jetpack-compose-before-and-after-24926.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/jetpack-compose-before-and-after-8b43ba0b7d4f?source=rss-9303277cb6db------2>)

Author: Chris Banes

Published: 2020-12-15T13:54:19Z

Content type: comparison

Language: en

Sources: [Chris Banes on Medium](<https://devfeed.tech/sources/chris-banes-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [jetpack-navigation](<https://devfeed.tech/topics/jetpack-navigation.md>), [Compose Compiler](<https://devfeed.tech/topics/compose-compiler.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [2020](<https://devfeed.tech/tags/2020.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [apk](<https://devfeed.tech/tags/apk.md>), [build](<https://devfeed.tech/tags/build.md>), [compose](<https://devfeed.tech/tags/compose.md>), [epoxy](<https://devfeed.tech/tags/epoxy.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [material](<https://devfeed.tech/tags/material.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [migration](<https://devfeed.tech/tags/migration.md>), [modules](<https://devfeed.tech/tags/modules.md>), [motionlayout](<https://devfeed.tech/tags/motionlayout.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [processing](<https://devfeed.tech/tags/processing.md>)

### AI overview

Migrating Tivi's UI to Jetpack Compose over about 11 months reduced XML source lines by 76%; the author also reports lower APK size and method count, and a 29% shorter build time. The migration proceeded screen by screen across 46 pull requests, first keeping Fragments and AndroidX Navigation, then moving to Navigation Compose. The build comparison used five offline, rerun Gradle builds on a high-end workstation throttled to 1.2 GHz with four workers. The entirely Compose build was 25 seconds faster than the Fragments-plus-Compose build, but the author attributes that difference to a newer Dagger/Hilt version and its use of the AGP 7.0 ASM API, not Compose. These figures are not a controlled apples-to-apples comparison: feature work, dependency updates, and changing Gradle, AGP, Kotlin, and beta Compose versions may affect results. The excerpt omits underlying metric tables, so it does not establish exact APK-size values.

### Source excerpt

Jetpack Compose -- Before and afterHow the build speed, APK size and source line count changed after migrating the Tivi sample app to Jetpack Compose This post has been updated since it was first published, to new include updated stats for Jetpack Compose 1.0.0-rc01. If you would like to see the original version of this post, see here. In 2020, I began the task of slowly migrating the UI in Tivi to be written in Jetpack Compose, and roughly 12 months later it is now complete. 🎉 In this blog post, we'll take a look back and compare a number of key metrics to see how well Compose compares in: APK size, build speed and lines of code. The app Before I go any further into the Compose side of things, let me quickly describe the app. Tivi is pretty heavily modularized, with each UI 'screen' in its own Gradle module (named ui-$NAME). Each of those screens was implemented in a Fragment, and then pieced together using AndroidX Navigation in the main app module. To give you an idea of the structure, here's a graph of the modules in the app: Graph of Tivi's module structure. Generated using Jake Wharton's handy Gradle task Most of the fragments had no knowledge of each other, since the navigation graph was implemented using deep link URIs, ensuring decoupling. Perhaps more importantly, it also allows independent module compilation which aids build parallelism. Note: the module structure of Tivi is not perfect by any means. There are too many dependencies of UI modules (at the top) to base modules (at the bottom). Ideally each layer should be seperated. Something for me to work on. Before I started the migration to Compose, Tivi used all the cool 🌈 UI 💫 things available to Android developers: Data Binding, Epoxy, Material Design Components, Insetter DBX, MotionLayout to name a few. But unfortunately most of these came with a build cost since they use annotation processing. Process of migrating Earlier I mentioned that we had just completed the 'first stage' of the migration, so w