diff options
author | 2023-09-25 21:46:58 -0700 | |
---|---|---|
committer | 2023-09-25 21:46:58 -0700 | |
commit | a052ddbb7e4ca73685480b131fcac9f727df19d4 (patch) | |
tree | c84d91b70995855c26087f5b59e7f6bd870681b6 /rust/binary_test.go | |
parent | ed27322aa5add7090773beb5ca499d869c89aba8 (diff) |
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
Diffstat (limited to 'rust/binary_test.go')
0 files changed, 0 insertions, 0 deletions