Files
build_soong/java
Colin Cross a052ddbb7e Shard srcjars when sharding javac compilation
java_library rules with javac_shard_size set split the sources into
shards to invoke javac multiple times, but were using a single javac
invocation for all srcjars.  For fraemwork-minus-apex, this srcjar
shard was the long pole at 15.7 seconds, containing 266 srcjars with
1542 java files with a total of 614593 lines.

Use a rough approximation of 5 sources per srcjar to determine the
number of shards to split the srcjars into based on javac_shard_size.
This results in splitting the srcjars for frameworks-minus-apex into
8 shards, with the longest taking 10.5 seconds to compile.

The longest shard contains most of the aidl srcjars, which have been
generated by sharded groups of 50 aidl files and have a much higher
average number of sources per srcjar (a mean and median of 27).  A
future improvement could be to shard those separately assuming a
higher number of sources per srcjar.

Bug: 302033097
Test: USE_RBE=false m frameworks-minus-apex
Change-Id: I85e740c7fcf5651cf18c0cdc90ab8c6ee39cb47b
2023-09-25 21:46:58 -07:00
..
2023-07-14 11:24:54 -07:00
2023-05-04 12:38:24 -07:00
2023-03-21 08:13:25 -07:00
2023-07-27 08:09:37 -07:00
2023-08-18 15:43:56 +00:00
2022-08-17 10:43:13 -07:00
2023-05-19 20:31:32 +00:00
2023-01-20 17:05:14 -05:00
2023-09-20 09:53:39 -07:00
2023-06-22 08:18:33 -07:00
2023-08-24 19:21:10 +00:00