Reputation: 8026
Curious if gradle build performance scales proportionally to CPU cores.
Considering single higher clocked vs dual Xeon workstation upgrade for gradle wrapper builds via Android Studio
Wondering if it's worth it considering I'm not bottlenecked by disk IO?
Upvotes: 10
Views: 2839
Reputation: 1330
Currently there are two ways Gradle can utilize multiple CPU cores:
Parallel build execution only works on multi-project builds with decoupled projects and can be activated with --parallel
on the command line. See
https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:parallel_execution for more information.
Parallel test execution can be activated by setting maxParallelForks
in a test task. See https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html
You should also be aware of Configuration on demand for large multi-project builds: https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:configuration_on_demand
So I'd say yes, Gradle performance scales well with multiple CPU cores.
Upvotes: 7