Skip to content

Commit de06369

Browse files
TapchicomaSpace Team
authored and
Space Team
committed
[Gradle, Compose] Enable 'enableIntrinsicRemember' by default
^KT-67387 Verification Pending
1 parent 8f0eeb1 commit de06369

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

libraries/tools/kotlin-compose-compiler/src/common/kotlin/org/jetbrains/kotlin/compose/compiler/gradle/ComposeCompilerGradlePluginExtension.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,17 @@ abstract class ComposeCompilerGradlePluginExtension @Inject constructor(objectFa
7373
* Intrinsic Remember is an optimization mode which improves the runtime performance of your application by inlining `remember`
7474
* invocations and replacing `.equals` comparison (for keys) with comparisons of the `$changed` meta parameter when possible. This
7575
* results in fewer slots being used and fewer comparisons being done at runtime.
76+
*
77+
* It is enabled by default.
78+
*
79+
* To change the default value, use the following code:
80+
* ```
81+
* composeCompiler {
82+
* enableIntrinsicRemember.set(false)
83+
* }
84+
* ```
7685
*/
77-
val enableIntrinsicRemember: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(false)
86+
val enableIntrinsicRemember: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(true)
7887

7988
/**
8089
* Remove groups around non-skipping composable functions.

libraries/tools/kotlin-compose-compiler/src/functionalTest/kotlin/org/jetbrains/kotlin/compose/compiler/gradle/ExtensionConfigurationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ExtensionConfigurationTest {
2424
listOf(
2525
"generateFunctionKeyMetaClasses" to "false",
2626
"sourceInformation" to "false",
27-
"intrinsicRemember" to "false",
27+
"intrinsicRemember" to "true",
2828
"nonSkippingGroupOptimization" to "false",
2929
"strongSkipping" to "false",
3030
"traceMarkersEnabled" to "false",

libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ComposeIT : KGPBaseTest() {
5555
":compileDebugKotlin",
5656
"-P plugin:androidx.compose.compiler.plugins.kotlin:generateFunctionKeyMetaClasses=false," +
5757
"plugin:androidx.compose.compiler.plugins.kotlin:sourceInformation=false," +
58-
"plugin:androidx.compose.compiler.plugins.kotlin:intrinsicRemember=false," +
58+
"plugin:androidx.compose.compiler.plugins.kotlin:intrinsicRemember=true," +
5959
"plugin:androidx.compose.compiler.plugins.kotlin:nonSkippingGroupOptimization=false," +
6060
"plugin:androidx.compose.compiler.plugins.kotlin:strongSkipping=false," +
6161
"plugin:androidx.compose.compiler.plugins.kotlin:traceMarkersEnabled=false",

0 commit comments

Comments
 (0)