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