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.

Comparing assembleRelease in AGP 8.9 vs 8.10.1 (nowinandroid)

The performance comparison between two Gradle build variants reveals minor differences in build times and resource usage. The mean build time for varianta_main is 515.286 seconds, while variantb_agp_8_10_1 is slightly longer at 516.571 seconds, marking a 0.25% increase. The most time-consuming tasks include com.android.build.gradle.internal.tasks.R8Task and com.android.build.gradle.internal.tasks.L8DexDesugarLibTask, with notable differences in execution times between the variants. CPU and memory usage across all processes and specifically for the build processes are nearly identical, with variantb_agp_8_10_1 showing a slight decrease in memory usage.

Comparing AGP 8.9 vs 8.10.1 (nowinandroid)

The analysis of the Gradle build performance data reveals a slight increase in overall build time when comparing variant B (AGP 8.10.1) to variant A. Specifically, the mean build time for variant B is approximately 0.61 seconds longer than variant A, representing a 0.6% increase. The P90 build times show a more pronounced difference, with variant B taking about 6.24 seconds longer than variant A, a 2.7% increase. In task execution, the most significant time differences are observed in tasks like :app:transformDemoDebugClassesWithAsm and :app:jacocoDemoDebug, where variant B shows increased execution times. Memory and CPU usage across all processes and specifically for the build processes are relatively stable with minor fluctuations. The total garbage collection (GC) counts are slightly higher in variant B for both Gradle and Kotlin processes, indicating a marginal increase in memory management activities.

[Catchup] anvil vs metro - incremental build

The analysis of the Gradle build performance data reveals a notable improvement in overall build times when comparing variant B (metro_0_3_2) to variant A (anvil). Specifically, variant B is faster by approximately 6.7 seconds (26.012s for A vs. 19.291s for B), translating to a 25.8% decrease in build time. This improvement is consistent across the 50th and 90th percentiles as well. In task execution, the :app-scaffold:compileDebugKotlin task shows a significant increase in execution time in variant B, while :app-scaffold:kspDebugKotlin is notably faster. The Kotlin build reports highlight a substantial increase in IR translation time for variant B, suggesting a potential area for optimization. Memory and CPU usage are slightly higher in variant B for all processes, with the build child processes in variant B utilizing significantly more CPU resources. Lastly, garbage collection data indicates fewer total collections in variant B, suggesting more efficient memory management.

[Catchup] anvil vs metro - clean build

The performance analysis of the two Gradle build variants, varianta_anvil and variantb_metro_0_3_2, reveals significant differences in build times and task execution. variantb_metro_0_3_2 shows a faster overall build time by approximately 22.2 seconds (14.1%) compared to varianta_anvil. Notably, the com.google.devtools.ksp.gradle.KspAATask and org.jetbrains.kotlin.gradle.tasks.KotlinCompile tasks in variantb_metro_0_3_2 are considerably slower, indicating potential areas for optimization. Memory usage is slightly lower in variantb_metro_0_3_2 across all processes, with a maximum difference of about 0.19 GB. The Kotlin Build Reports highlight variantb_metro_0_3_2 as having a higher compiler IR translation time and more intensive code analysis, suggesting more complex operations despite the overall faster build time.

Comparing lintDebug in 300 modules project limiting task parallelization (3 workers)

The performance comparison between varianta_main and variantb_lint_1.5g reveals significant differences in build times and resource utilization. variantb_lint_1.5g shows a notable reduction in overall build time, clocking in at approximately 1057.511 seconds compared to varianta_main’s 1642.304 seconds, marking a decrease of around 35.6%. This variant also uses less memory, with a maximum of 11.64 GB compared to varianta_main’s 13.69 GB. However, CPU usage is slightly higher in variantb_lint_1.5g for the build process, peaking at 93.95% versus 92.00% in varianta_main.

Gradle 8.14 vs 8.13 in an Android Project

The performance comparison between two Gradle build variants shows a slight improvement in overall build time for variant B (218.791s) compared to variant A (221.317s), with a decrease of about 1.14%. The most time-consuming tasks across both variants include :app:l8DexDesugarLibDemoDebug, :app:mergeExtDexDemoDebug, and :core:designsystem:compileDemoDebugKotlin, with variant B generally showing better performance in these tasks. Memory usage is slightly lower in variant B for all processes and build child processes. The total garbage collection counts are slightly higher in variant B for both Gradle and Kotlin processes.

Gradle 8.14-rc2 in Nowinandroid

The analysis of the Gradle build performance between two variants, varianta_gradle_8_13 and variantb_gradle_8_14_rc2, reveals minor differences in build times and task execution. The mean build time for varianta is 215.687 seconds, slightly higher than variantb at 215.076 seconds, showing a marginal improvement of 0.28%. Key tasks such as KotlinCompile, LinkApplicationAndroidResourcesTask, and KspTaskJvm show minor fluctuations in execution times between the two variants, with differences generally under 10%. Memory and CPU usage for all processes and specifically for the build process are nearly identical across variants, with maximum CPU usage hitting 100% for all processes in both variants. The total garbage collection counts in Gradle and Kotlin processes are also similar, indicating consistent memory management behavior between the two variants.

CatchUp using Metro with abi scenario

The performance comparison between varianta_main and variantb_z/metro reveals that variantb_z/metro generally has a shorter build time with a mean reduction of 25.1% (6.622 seconds). Notably, variantb_z/metro also exhibits higher CPU usage in build child processes, suggesting more intensive parallel task execution. In the Kotlin Build Reports, variantb_z/metro shows a significant increase in Compiler IR translation time, which could indicate more complex translation processes. Memory usage is slightly lower in variantb_z/metro across all processes, contributing to its efficiency.

CatchUp using Metro on clean builds

The analysis of the Gradle build performance comparison data between two variants reveals notable differences in build times and task execution times. Variant B (variantb_z/metro) shows a faster overall build time with a mean reduction of 20.42 seconds (13.4% faster) compared to Variant A (varianta_main). Key tasks such as com.android.build.gradle.internal.tasks.MapSourceSetPathsTask and com.google.devtools.ksp.gradle.KspAATask also exhibit significant time reductions in Variant B. Memory usage is slightly lower in Variant B across all processes, with a maximum memory usage of 6.9 GB compared to 7.04 GB in Variant A. CPU usage is nearly identical for both variants, maxing out at 100% for all processes.

Comparing lintDebug in 300 modules project limiting task parallelization

The analysis of the Gradle build performance comparison between varianta_main and variantb_lint_2g reveals several key findings. The overall build time for variantb_lint_2g is longer by approximately 73 seconds (7.3% increase) compared to varianta_main. In task execution, the most significant difference is observed in the :layer_0:module_0_1:lintAnalyzeDebug task, where variantb_lint_2g takes about 13.64 seconds longer than varianta_main. Memory and CPU usage across all processes are relatively similar between the two variants, with slight variations in peak values. The total garbage collection (GC) count was lower in variantb_lint_2g by 73 collections, indicating potentially more efficient memory management.

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.