Optimize CPU time when running d8 and r8
Pass -XX:+TieredCompilation -XX:TieredStopAtLevel=1 to the JVM to reduce the time spent JITing, which in local experiments reduced the CPU time of R8 while increasing the wall time, and reduced the total number of runnable threads. Without the new flags: $ time out/soong/host/linux-x86/bin/r8-compat-proguard -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ... real 0m30.090s user 4m35.337s sys 0m12.853s With the new flags: $ time out/soong/host/linux-x86/bin/r8-compat-proguard -JXX:+TieredCompilation -JXX:TieredStopAtLevel=1 -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ... real 0m35.674s user 2m45.135s sys 0m9.531s The increase in wall time should be offset by the better parallelism from the reduced CPU time. Bug: 119270658 Test: m checkbuild Change-Id: I8fc78b5ef1f8c6f51fd97a29461b96ae2b35cada
Loading
Please register or sign in to comment