Testing reservedMemoryPerTask 1G in Lint builds

The analysis of the Gradle build performance data reveals minor differences between the two variants, with variant B showing a slight increase in overall build time by approximately 0.3 seconds (0.3%). Notably, the most time-consuming tasks across both variants include com.android.build.gradle.internal.lint.AndroidLintAnalysisTask, :core:designsystem:compileProdReleaseKotlin, and :core:common:lintAnalyzeJvmMain, with variant B generally performing slightly better in these tasks. Memory and CPU usage are nearly identical for both variants, with no significant differences observed. The total garbage collection counts for Gradle and Kotlin processes are slightly lower in variant B, suggesting marginally better memory management.

Using R8 in a different process with 4gb and G1

The performance comparison between two Gradle build variants, varianta_main_r8 and variantb_r8_different_process, reveals several key differences. The overall build time for variantb_r8_different_process is slightly higher by approximately 10.6 seconds (2.04% increase) compared to varianta_main_r8. Notably, variantb_r8_different_process shows a significant increase in memory usage, with a maximum of 14.24 GB compared to 11.2 GB for varianta_main_r8, marking a 27.14% increase. Additionally, variantb_r8_different_process has fewer total garbage collection (GC) events in the Gradle process but more in the Kotlin process, suggesting different memory management behaviors. The R8Task and L8DexDesugarLibTask are among the most time-consuming tasks, with variantb_r8_different_process showing longer execution times, especially in L8DexDesugarLibTask where the mean time increased by over 47%.

Kotlin 2.1.20 vs 2.1.0 in nowinandroid

The Gradle build performance comparison shows a slight improvement in overall build times for variantb_kotlin_2_1_20 compared to varianta_main_2_1_0, with a mean time of 213.747 seconds versus 214.317 seconds, respectively. The most time-consuming tasks across both variants were ‘org.jetbrains.kotlin.gradle.tasks.KotlinCompile’, ‘com.android.build.gradle.internal.tasks.DexMergingTask’, and ‘com.android.build.gradle.tasks.PackageApplication’. Notably, the ‘com.google.devtools.ksp.gradle.KspTaskJvm’ task showed a significant timing variation of more than 10% between the two variants. In terms of resource consumption, both variants showed similar CPU and memory usage, with a slight increase in memory usage for variantb_kotlin_2_1_20.

Comparing -Xms usage in nowinandroid

The analysis of the Gradle build performance comparison data reveals that the variant variantb_no_xms generally takes longer to build than varianta_using_xms. The mean build time for variantb_no_xms is approximately 3.5% longer than varianta_using_xms. The most time-consuming tasks across both variants are :app:l8DexDesugarLibDemoDebug, :app:mergeExtDexDemoDebug, and :core:designsystem:compileDemoDebugKotlin. In terms of CPU and memory usage, both variants reach 100% CPU usage, but varianta_using_xms uses more memory. Garbage collection data shows more collections for variantb_no_xms.

Reducing parallelization of Kotlin compiler to 3 workers in nowinandroid

The Gradle build performance comparison shows that the build times between the two variants are almost identical with a mean difference of just 99ms (0.05%). The variant with the Kotlin compiler and 3 workers (variantb_kotlin_compiler_3_workers) has slightly higher P90 values in most tasks, indicating that it might be slower in worst-case scenarios. The most time-consuming tasks across both variants are :app:l8DexDesugarLibDemoDebug, :app:mergeExtDexDemoDebug, and :core:designsystem:compileDemoDebugKotlin. Notably, the :app:mergeExtDexDemoDebug task is faster in variantb_kotlin_compiler_3_workers by 10.3%. CPU and memory usage are almost identical between the two variants.

Comparing G1 vs Parallel in nowinandroid

The Gradle build performance comparison data reveals that variant B (variantb_main_parallel) generally performs better than variant A (varianta_main_g1). The mean build time for variant B is approximately 14.3 seconds, which is 6.6% faster than variant A’s mean build time of around 21.5 seconds. The most time-consuming tasks across both variants are :app:l8DexDesugarLibDemoDebug, :app:mergeExtDexDemoDebug, and :core:designsystem:compileDemoDebugKotlin. Significant differences in task execution times are observed in :app:transformDemoDebugClassesWithAsm and :core:designsystem:bundleLibCompileToJarDemoDebug. The CPU and memory usage are also slightly lower for variant B.