Configuration Cache read-only mode in CI - Gradle 9.1.0-RC1

The performance comparison between Gradle build variants varianta_9.0.0 and variantb_9.1.0-rc-1 reveals a slight increase in overall build time in the newer variant by approximately 2.36 seconds (1.16% increase). Notably, the hiltJavaCompileDebug task in variantb_9.1.0-rc-1 shows a significant improvement, reducing its execution time by almost 50%. However, this variant also exhibits increased execution times for several Kotlin compilation tasks (kspDebugKotlin), particularly in the domain and repository modules. Memory usage across all processes is slightly reduced in the newer variant, while CPU usage remains maximally utilized in both variants. The total garbage collection counts remain unchanged across variants.

KGP 2.2.20-Beta2 vs 2.2.0

The analysis of the Gradle build performance comparison between varianta_2.2.0 and variantb_2.2.20-Beta2 reveals several key findings. The overall build time for variantb_2.2.20-Beta2 is slightly longer, with a mean time of 762.133 seconds compared to 750.638 seconds for varianta_2.2.0, marking a 1.53% increase. Significant differences are noted in task execution times, particularly for :core:account:kspDebugKotlin which shows a 44% increase in mean execution time in variantb_2.2.20-Beta2. The CPU and memory usage are closely matched between the variants, with both maxing out CPU usage at 100% and memory usage peaking around 14 GB. The Kotlin Build Reports indicate that variantb_2.2.20-Beta2 has a slightly longer compiler code analysis time but a quicker code generation rate.

Gradle 9.0-rc4 vs 8.14.2

The analysis of Gradle build performance data reveals a slight increase in overall build time when transitioning from variant A (8.14.2) to variant B (9.0.0-rc4). Specifically, the mean build time increased by approximately 7.5 seconds (0.85% increase), with the P90 time showing an increase of about 8.6 seconds (0.95% increase). Notably, the :layer_0:module_0_1:kspDebugKotlin task showed a significant increase in mean execution time by approximately 3.4 seconds (46.5% increase). In contrast, the :layer_0:module_0_1:parseDebugLocalResources task saw a decrease in mean execution time by about 4.9 seconds (-28.5%). Memory usage across all processes slightly increased in variant B, with a peak usage of 13.98 GB compared to 13.53 GB in variant A. CPU usage remained maximally utilized at 100% for all processes in both variants.

Gradle 9.0-rc3 vs 8.14.2

The detailed analysis of Gradle build performance between two variants reveals marginal differences in build times, with variantb_9.0.0-rc3 generally showing slight improvements over varianta_8.14.2. The mean build time for variantb is approximately 877.819 seconds compared to varianta’s 878.069 seconds, indicating a minor reduction. Notable task execution times, such as for :layer_0:module_0_1:kspDebugKotlin, show significant increases in variantb, suggesting potential areas for optimization. Memory usage across all processes shows a slight increase in variantb, with a maximum of 13.2 GB compared to 12.84 GB in varianta. CPU usage remains high in both variants, maxing out at 100%. The total garbage collection counts are very close, with 268 for varianta and 269 for variantb, indicating similar memory management behavior.

Increasing Gradle process memory in KSP2 scenario

The analysis of the Gradle build performance data reveals several key insights between the two variants, varianta_k2_kotlin_2.2.0 and variantb_k2_increase_memory_gradle. The overall build time for variantb_k2_increase_memory_gradle is slightly higher at approximately 626.643 seconds compared to 618.083 seconds for varianta_k2_kotlin_2.2.0, marking a 1.38% increase. Among the most time-consuming tasks, significant differences are observed in tasks like com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask and dagger.hilt.android.plugin.task.AggregateDepsTask, where variantb_k2_increase_memory_gradle shows increased execution times. Memory usage also shows a notable increase in variantb_k2_increase_memory_gradle with a maximum of 13.57 GB compared to 11.65 GB in varianta_k2_kotlin_2.2.0. The total garbage collection (GC) counts are slightly lower in variantb_k2_increase_memory_gradle across both Gradle and Kotlin processes.

K2 with Kotlin 2.1.21

The performance comparison between two Gradle build variants shows notable differences in build times and resource usage. Variant B generally exhibits longer build times with a mean build time of 617.338 seconds compared to Variant A’s 569.857 seconds, marking an 8.3% increase. The most time-consuming tasks in Variant B are consistently longer than in Variant A, particularly :layer_0:module_0_1:kspDebugKotlin which takes 14.614 seconds in Variant B versus 10.220 seconds in Variant A. Memory usage is also higher in Variant B with a maximum of 11.73 GB compared to 11.45 GB in Variant A. CPU usage for the build process is slightly higher in Variant B at 96.98% compared to 96.32% in Variant A. Garbage collection activities are more frequent in Variant B with 280 total collections compared to 204 in Variant A, indicating potential inefficiencies in memory management.

K2 with Kotlin 2.2

The analysis of Gradle build performance data reveals several key differences between varianta_kotlin_2.2.0 and variantb_k2_kotlin_2.2.0. Notably, the overall build time for variant B is longer by approximately 42.7 seconds (7.3% increase). In task execution, the :layer_0:module_0_10:kspDebugKotlin task shows a significant increase in execution time in variant B, suggesting a potential area for optimization. Memory usage is higher in variant B across all processes, with a notable increase in the main build process (up to 6.7 GB in variant B compared to 5.1 GB in variant A). Garbage collection activities also increased in variant B, indicating heavier memory management activities. These findings suggest that variant B may be less efficient in terms of both time and resource usage compared to variant A.

Kotlin 2.2.0 vs 2.1.21, Android 230 modules

The analysis of the Gradle build performance data reveals subtle yet insightful differences between two Kotlin variants, varianta_kotlin_2.1.21 and variantb_kotlin_2.2.0. The overall build time shows a slight improvement in variantb by approximately 0.42 seconds (0.4% faster). Notably, the most time-consuming tasks across variants include :layer_0:module_0_1:kspDebugKotlin, :layer_0:module_0_10:kspDebugKotlin, and :layer_0:module_0_12:kspDebugKotlin, with variantb generally showing marginal increases in execution times. CPU and memory usage are closely matched between the variants, with variantb showing a slight increase in maximum memory usage by about 0.09 GB. Garbage collection metrics indicate a very similar performance, with total collections slightly lower in variantb. The Kotlin Build Reports highlight a faster compiler code generation and analysis in variantb, suggesting efficiency improvements in the newer Kotlin version.

Parallel vs G1 - 400 modules Project

The performance comparison between varianta_parallel and variantb_g1 reveals several key insights. The overall build time for variantb_g1 is longer by approximately 55 seconds (6% increase) compared to varianta_parallel. Notably, the DexMergingTask and AggregateDepsTask show significant time increases in variantb_g1, suggesting areas where performance optimizations could be targeted. In task execution, variantb_g1 generally exhibits longer times across most tasks, particularly in Kotlin compilation tasks like :layer_0:module_0_10:kspDebugKotlin, which is about 7% slower in variantb_g1. Memory usage is slightly higher in variantb_g1 by about 0.3 GB, aligning with the increased build times and task durations observed. The garbage collection logs indicate a similar number of total collections between the variants, suggesting that garbage collection overhead does not significantly differ between them. The Kotlin Build Reports highlight a slower performance in variantb_g1 across various metrics, including compiler initialization, IR generation, and code generation, which corroborates the observed longer build times.

9.0.0-RC1 vs 8.14.2 - Android project 350 modules

The analysis of the Gradle build performance data reveals several key insights across different metrics and task types. The overall build times for varianta_9.0.0-rc1 averaged around 878.54 seconds, slightly slower than variantb_8.14.2 at 869.71 seconds, showing a minor difference of about 1%. Among the most time-consuming tasks, :layer_0:module_0_1:compileDebugKotlin and related Kotlin compilation tasks consistently took longer in varianta_9.0.0-rc1 compared to variantb_8.14.2. Memory usage was slightly higher in variantb_8.14.2 with a maximum of 12.75 GB compared to 12.67 GB in varianta_9.0.0-rc1. CPU usage for all processes hit the maximum of 100% for both variants, indicating full utilization during the build. The total garbage collection counts were slightly higher in varianta_9.0.0-rc1 for both Gradle and Kotlin processes, suggesting a bit more frequent memory cleanup.