Compose Compiler — Feature Flags

--

Optimization strategies

Hello everyone 👋🏻
This is a brief news update.

Comparison

…Do you use Compose Compiler?
There’s a new deprecation.
Since Kotlin version 2.0.20, *enableStrongSkippingMode is deprecated. You can now use the Compose Compiler featureFlags.
⁉️
Through the gradle.kts file, we can set the type of optimization strategy in Compose. There are three types:

  • IntrinsicRemember:
    Optimizes how remember handles state within compositions.
  • OptimizeNonSkippingGroups:
    Improves efficiency for composition groups that cannot be skipped.
  • StrongSkipping:
    Enables more aggressive optimizations for recomposition, enhancing performance when certain parts of the UI do not need to be updated.
    .
.
.
}
}

kotlin {
jvmToolchain(17)
}

composeCompiler {
featureFlags = setOf(
ComposeFeatureFlag.StrongSkipping
)
}

dependencies {

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
.
.
.

--

--

Kҽʋιɳ Sҽɾɾαɳσ
Kҽʋιɳ Sҽɾɾαɳσ

Written by Kҽʋιɳ Sҽɾɾαɳσ

Android Developer 👨‍💻 I contribute to open source - create videos for the community - software engineer passionate about every piece of code written 🤩🤩

No responses yet