运行Android Studio gradle build时如何使用所有CPU核心/线程? [英] How to use all CPU cores/threads when running Android Studio gradle build?
问题描述
我在Android Studio /
Gradle中查找参数或配置,可以设置该版本,以便在构建时使用所有CPU内核。
如果我有一个四核CPU,每个核心运行8个线程,我该如何优化这个版本,这样它会使用它可能获得的每个资源(当然并行)?
谢谢! 在我的项目中的 local.properties
文件中
org.gradle.daemon = true
org.gradle.parallel = true
org.gradle.configureondemand = true
另外您可以指定
org.gradle.parallel.threads
指定最大数量线程用于并行执行。它需要 org.gradle.parallel = true
。 这里可以找到更多关于它的信息。
I'm looking for a parameter or configuration in Android Studio / Gradle, that can set the build so it will use all of my CPU cores during build time. i.e. If I have a quad-core CPU and each core is running 8 threads, how can I optimize the build so it will use every resource it could get (parallel of course)?
Thank you!
in the local.properties
file in my project I have
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
additionally you can specify
org.gradle.parallel.threads
which specifies the maximum number of threads to use for parallel execution. it needs org.gradle.parallel=true
. Here you can find more information about it
这篇关于运行Android Studio gradle build时如何使用所有CPU核心/线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!