4

System info
enter image description here

Software info
OS:
enter image description here
Java: OpenJDK 12.0.2
Gradle: 5.6.2

The issue Building Gradle multi-project with parallel builds enabled consumes almost all the CPU time. PC is not interactable during the build process

Steps to reproduce
1. git clone --recursive https://github.com/vividus-framework/vividus.git
2. cd vividus
3. ./gradlew build

Ivan Kalinin
  • 215
  • 1
  • 10
  • 1
    You get what you have ordered. Where is the problem? You want that the build gets done as fast as possible and the consequence is that all resources are consumed. – Peter Oct 23 '19 at 14:10
  • Hi Peter, thanks for your input :) Same set of setting on Unix-like, for example, macOS does not become not interactable. The question here how I can free some resources for Windows without changing the building approach; Once again thank you for the answer! – Ivan Kalinin Oct 24 '19 at 08:21

1 Answers1

5

In your gradle.properties file (or GRADLE_OPTS environment variable), try setting org.gradle.priority=low. On my machine it has a noticeable effect with parallel enabled, but I've also heard from some of my co-workers with older machines that this setting didn't help them too much.

You can also experiment with setting org.gradle.workers.max. It defaults to the number of CPU processors. Maybe set it to the number of logical processors minus one.

If it still stops you from interacting with your computer during the build, you should probably just disable parallel execution and let Gradle work on a single processor.

Bjørn Vester
  • 6,851
  • 1
  • 20
  • 20