---
title: "Jetpack Compose Performance at Scale: Diagnosing and Fixing Cross-Module Stability Leaks"
url: https://daily.dev/posts/jetpack-compose-performance-at-scale-diagnosing-and-fixing-cross-module-stability-leaks-kfe3c2fl9
source_url: https://proandroiddev.com/jetpack-compose-performance-at-scale-diagnosing-and-fixing-cross-module-stability-leaks-87327d8625c7
type: article
source: "ProAndroidDev"
published: 2026-08-10T22:00:27.918Z
updated: 2026-08-10T22:01:10.945Z
tags: ["android", "kotlin", "jetpack-compose"]
reading_time: 9
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Jetpack Compose Performance at Scale: Diagnosing and Fixing Cross-Module Stability Leaks

**[ProAndroidDev](https://daily.dev/sources/pand)** · 9 min read · 0 upvotes · 0 comments

## Summary

Standard Kotlin collections like List<T> crossing Gradle module boundaries cause Jetpack Compose to mark data classes as unstable, triggering full recomposition on every frame even when data hasn't changed. Three common fixes — @Immutable annotations, kotlinx.collections.immutable, and custom wrappers — each carry significant maintenance costs. The recommended pragmatic solution is a compose_compiler_config.conf file that globally declares specific packages as stable, eliminating cross-module instability without polluting domain models with Compose dependencies. The article also covers Strong Skipping Mode in Kotlin 2.0+, warns against using the config to mask mutable state (var properties), and provides an open-source diagnostic script to verify stability improvements via Compose compiler metrics.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://proandroiddev.com/jetpack-compose-performance-at-scale-diagnosing-and-fixing-cross-module-stability-leaks-87327d8625c7>

## Questions this post answers

### Why does Jetpack Compose treat List<T> as unstable and cause unnecessary recomposition?

Compose treats List<T> as unstable because it is a Kotlin interface whose runtime implementation (e.g., ArrayList) can mutate without notifying Compose. Since Compose cannot guarantee the list won't change silently, it marks any class containing List<T> as unstable and skips no recomposition — re-evaluating the entire tree on every frame even when data is unchanged.

_Android teams debugging scroll jank from recomposition track issues like this on daily.dev._

### How do I fix Jetpack Compose instability for data classes crossing Gradle module boundaries without adding @Immutable to every class?

Use a compose_compiler_config.conf file at your root Gradle directory listing the package namespaces to treat as stable (e.g., com.example.core.model.**). Wire it into build.gradle.kts via the ComposeCompilerGradlePluginExtension stabilityConfigurationFile property (Kotlin 2.0+) or freeCompilerArgs for older setups. This eliminates cross-module instability across 50+ modules without annotating individual DTOs or adding Compose runtime dependencies to domain modules.

_Developers shipping multi-module Compose apps find architecture decisions like this covered on daily.dev._

### What is the risk of using compose_compiler_config.conf to mark a class with var properties as stable in Jetpack Compose?

Marking a class with var properties as stable via compose_compiler_config.conf causes Compose to aggressively skip recomposition for that class. If the var property mutates in Kotlin code, the UI will not update because Compose believes the class hasn't changed. This creates hard-to-trace state bugs where the UI drifts out of sync with the underlying data.

_Keeping up with Compose stability gotchas before they hit production is easier when following Android topics on daily.dev._

## Similar posts on daily.dev

- [Stability in Jetpack Compose Explained\!](https://daily.dev/posts/stability-in-jetpack-compose-explained--07aul2kgb) · ProAndroidDev · 1 upvotes · 0 comments
- [Why Your ViewModel Is Technically Unstable — and Why Compose Doesn’t Mind](https://daily.dev/posts/why-your-viewmodel-is-technically-unstable-and-why-compose-doesn-t-mind-tni5xiy8b) · droidcon · 0 upvotes · 0 comments
- [Jetpack Compose Performance Optimization](https://daily.dev/posts/jetpack-compose-performance-optimization-qw7nfjbya) · Towards Dev · 7 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/jetpack-compose-performance-at-scale-diagnosing-and-fixing-cross-module-stability-leaks-kfe3c2fl9)
