KSP 2.2.10 with KSP2 Enabled

The analysis of the Gradle build performance data reveals that Variant B (variantb_2.2.10-ksp2) generally has longer build times compared to Variant A (varianta_2.2.10). Specifically, the mean build time for Variant B is approximately 8.2% longer than Variant A, translating to an increase of about 30.3 seconds. This trend is consistent across the P50 and P90 percentiles as well. In task execution, Variant B shows longer times particularly in Kotlin-related tasks, suggesting a possible area for optimization. Memory usage is also higher in Variant B by approximately 15.3%, which could be contributing to the increased build times. The total garbage collection (GC) events are significantly higher in Variant B, indicating more frequent memory management operations which could be impacting performance.

KGP 2.2.10 vs 2.2.0

The analysis of the Gradle build performance data reveals minor differences between the two variants, varianta_2.2.0 and variantb_2.2.10. The overall build time for varianta_2.2.0 averages around 372.6 seconds, while variantb_2.2.10 is slightly faster at 370.4 seconds, marking a modest improvement of approximately 0.6%. The most time-consuming tasks across both variants include :core:identity:compileDebugKotlin, :core:contact:compileDebugKotlin, and :feature:post:compileDebugKotlin, with each showing minor time differences between the variants. Memory usage is slightly higher in variantb_2.2.10 with a peak of 10.94 GB compared to 10.74 GB in varianta_2.2.0. CPU usage for both variants reached the maximum capacity of 100%. The Kotlin build reports indicate a slight efficiency improvement in variantb_2.2.10 in terms of incremental compilation and compiler code generation.

AGP 9.0.0-alpha01 vs AGP 8.12

The analysis of Gradle build performance between two variants, varianta_agp_8.12 and variantb_agp_9-alpha01, reveals a slight increase in overall build time in the newer variant by approximately 0.35 seconds (0.35% increase). The configuration time also shows a minor increase by about 0.09 seconds (2.15% increase). The most time-consuming tasks across both variants include :core:cart:compileDebugKotlin, :core:identity:compileDebugKotlin, and :core:contact:compileDebugKotlin, with marginal differences in execution times between the variants. Memory usage is slightly higher in variantb_agp_9-alpha01 for all processes and specifically for build child processes. CPU usage remains nearly identical across both variants. The total garbage collection counts are slightly reduced in the newer variant.

Gradle 9.1.0-RC1 vs 9.0.0

The analysis of the Gradle build performance between variants varianta_9.0.0 and variantb_9.1.0-rc-1 reveals slight differences in build times and resource usage. The overall build time for varianta_9.0.0 averaged 203.511 seconds, while variantb_9.1.0-rc-1 was slightly slower at 204.142 seconds, marking a 0.31% increase. Notably, the :app:app:mergeExtDexDebug task showed a significant increase in execution time in the newer variant. CPU and memory usage across all processes were nearly maxed out for both variants, with a slight increase in memory usage in variantb_9.1.0-rc-1. The total garbage collection events also saw a small rise from 101 to 103 events on average.

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.