This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The assumption here is that formc does not generate any new APIs that would be referenced by downstream Java/Kotlin code. Thus we do not need to include formc output in ijars. The benefit of this is that we can produce 'full_ijar' without needing to wait for the formc action to complete. By producing 'full_ijar' earlier, we can begin downstream module compilations sooner, thereby reducing the critical path slightly. Also, note that formc takes as input the "full" Java jar. So, by moving formc off the critical path, we no longer need to wait for the full Javac action either; instead we only need the hjar, which is produced very quickly by Turbine. Test scenario: add a new public Java method in android-common, then build //tools/adt/idea/android/... Results: Before this change: trial #1: 338 seconds trial #2: 323 seconds trial #3: 333 seconds After this change: trial #1: 316 seconds trial #2: 308 seconds trial #3: 305 seconds The improvement is relatively small in practice, it seems. But I did observe that compilation of downstream modules now starts in parallel with the "*.pjava.jar" and "*.java.jar" actions, which is good. Bug: relates to b/200690965 Test: Bazel build Change-Id: I3051c2328bebacf2f1c3de9af9950c4577388e0b
- Loading branch information