Status Update
Comments
[Deleted User] <[Deleted User]> #2
Thanks for the report and all the details. Are you only seeing these build speed issues on CI? What's the build speed like in local development?
It would be great if you could share the compiler dump file with
su...@google.com <su...@google.com> #3
Are you only seeing these build speed issues on CI? What's the build speed like in local development?
Hi, we usually don't run minified builds on our local environments, mainly because of the time it takes to run it and the amount of ram it would require.
I don't want to complain even more about it, but I'm sure you are already aware of the constraints that Android has. We already have the IDE taking +10GB, the Kotlin Compiler daemon (1-6GB depending on the compilation work needed), the Gradle daemon (usually around 14G at the end of the build). If we were to enable R8 on local builds, this would render local machines (even our beefy M1s) unable to use for minimum 15 minutes each time we would want to run the app. Devs will turn this off immediately.
A good starting point would be to check if there are any passes that take up an unusual amount of time.
Do you mean running the compiledump.py
? Is this what the dump will be used for? If so, can I do that locally without any external tool? I'd rather not share the dump if I can test it myself. If there is more to it, then I'll try to upload it somewhere safe.
su...@google.com <su...@google.com> #4
Do you mean running the compiledump.py? Is this what the dump will be used for? If so, can I do that locally without any external tool? I'd rather not share the dump if I can test it myself. If there is more to it, then I'll try to upload it somewhere safe.
Running compiledump.py --print-times
can give some insights into whether an unusual amount of time is spent in some compiler pass. It may be necessary to manually dig deeper into where time is spent in a given pass. If compilation time is spread evenly across the various compilation stages then the issue may be due to the sheer size of the input, but this is difficult to tell without access to the dump.
./tools/compiledump.py -d dump.zip --disable-assertions --print-times --java-opts "-Dcom.android.tools.r8.printtimes.minvalue=0"
If you can share the stdout of running the above command that would be great.
[Deleted User] <[Deleted User]> #5
I will (I'm currently downloading/installing the necessary toolchain).
Should this be run on the same host, or can it be run on a local environement. I'm wondering if this depends on the host architecture, JDK version, etc?
[Deleted User] <[Deleted User]> #6
Ideally you would run it in both environments, as that may be useful to pinpoint areas where the two compilations differ. Running this in a local environment first should be fine.
su...@google.com <su...@google.com> #7
Here is the recorded timings on my local env (took ~10 minutes)
R8 8.7.18: 846169ms
- (0%) Unaccounted: 46ms
- (0%) Run prelude: 0ms
- (1%) Read app: 12063ms
- (0%) Unaccounted: 68ms
- (1%) DexApplication.read: 10898ms
- (0%) To direct app: 1096ms
- (0%) Load machine specification: 1ms
- (0%) Read main dex classes: 0ms
- (0%) Close providers: 0ms
- (0%) Create AppView: 52ms
- (0%) Set app services: 52ms
- (0%) Collect synthetic inputs: 44ms
- (0%) Register references and more setup: 12ms
- (0%) Unaccounted: 12ms
- (0%) Read keep specifications: 0ms
- (21%) Strip unused code: 186026ms
- (0%) Unaccounted: 0ms
- (1%) Before enqueuer: 8674ms
- (0%) Unaccounted: 1916ms
- (0%) Build root set...: 6757ms
- (20%) Enqueuer: 171293ms
- (0%) Unaccounted: 0ms
- (0%) Set up enqueuer: 80ms
- (20%) Trace application: 171212ms
- (0%) Unaccounted: 7ms
- (0%) Register analysis: 0ms
- (0%) Transfer minimum keep info: 659ms
- (0%) Model library: 4ms
- (0%) Unconditional rules: 0ms
- (0%) Enqueue all: 0ms
- (19%) Trace: 165776ms
- (0%) Unaccounted: 0ms
- (19%) Grow the tree.: 165776ms
- (13%) Unaccounted: 111333ms
- (0%) Conditional rules: 0ms
- (6%) Find consequent items for -if rules...: 54442ms
- (0%) Finalize library override: 79ms
- (0%) Finish analysis: 4012ms
- (0%) Finish compat building: 0ms
- (0%) Create result: 671ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite with deferred results: 0ms
- (0%) Remove dead protos: 0ms
- (0%) Prune field access mappings: 48ms
- (0%) Prune dead items: 206ms
- (0%) Unaccounted: 0ms
- (0%) Prune keep info: 204ms
- (0%) Prune others: 1ms
- (0%) Ensure static factory references: 4ms
- (0%) Rebuild application: 41ms
- (0%) Create app info with liveness: 368ms
- (0%) Finalize enqueuer result: 0ms
- (0%) After enqueuer: 6058ms
- (0%) Unaccounted: 3070ms
- (0%) Pruning application: 2987ms
- (0%) Unaccounted: 1602ms
- (0%) Prune AppView: 1385ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 1304ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 3ms
- (0%) Prune RootSet: 76ms
- (39%) Run center tasks: 331177ms
- (3%) Unaccounted: 25561ms
- (0%) NestReduction: 22ms
- (0%) Access modification: 3421ms
- (0%) Unaccounted: 1580ms
- (0%) Rewrite AppView: 1840ms
- (0%) Compute new member rebinding lens: 47ms
- MERGE Rewrite AppView concurrently: 4404ms, tasks: 7, threads: 5, utilization: 47%
- (40%) Task 1: 1778ms
- (2%) Unaccounted: 118ms
- (1%) Rewrite SyntheticItems: 66ms
- (0%) Rewrite ClassToFeatureSplitMap: 1ms
- (0%) Rewrite MainDexInfo: 1ms
- (0%) Rewrite fields: 0ms
- (23%) Rewrite FieldAccessInfoCollectionImpl: 1026ms
- (2%) Unaccounted: 109ms
- (20%) Rewrite FieldAccessInfoImpl: 916ms
- (11%) Rewrite ObjectAllocationInfoCollectionImpl: 517ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 46ms
- (0%) Unaccounted: 2ms
- (0%) Rewrite class info: 5ms
- (0%) Rewrite method info: 22ms
- (0%) Rewrite field info: 15ms
- (0%) Task 2: 4ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 3ms
- (0%) Task 3: 5ms
- (0%) Unaccounted: 1ms
- (0%) Rewrite AssumeInfoCollection: 4ms
- (0%) Task 4: 0ms
- (0%) Task 5: 3ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 2ms
- (16%) Task 6: 707ms
- (0%) Unaccounted: 0ms
- (16%) Rewrite RootSet: 707ms
- (0%) Unaccounted: 1ms
- (16%) Rewrite DependentMinimumKeepInfoCollection: 705ms
- (1%) Task 7: 86ms
- (0%) Redundant bridge removal: 2200ms
- (0%) Unaccounted: 486ms
- (0%) Prune AppView: 525ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 485ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 0ms
- (0%) Prune RootSet: 38ms
- (0%) Rewrite AppView: 1188ms
- (0%) Compute new member rebinding lens: 30ms
- MERGE Rewrite AppView concurrently: 2943ms, tasks: 7, threads: 5, utilization: 49%
- (39%) Task 1: 1156ms
- (2%) Unaccounted: 77ms
- (0%) Rewrite SyntheticItems: 24ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (24%) Rewrite FieldAccessInfoCollectionImpl: 712ms
- (5%) Unaccounted: 152ms
- (19%) Rewrite FieldAccessInfoImpl: 559ms
- (10%) Rewrite ObjectAllocationInfoCollectionImpl: 308ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 33ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 3ms
- (0%) Rewrite method info: 17ms
- (0%) Rewrite field info: 12ms
- (0%) Task 2: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 1ms
- (0%) Task 3: 4ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 4ms
- (0%) Task 4: 0ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (18%) Task 6: 541ms
- (0%) Unaccounted: 0ms
- (18%) Rewrite RootSet: 541ms
- (0%) Unaccounted: 0ms
- (18%) Rewrite DependentMinimumKeepInfoCollection: 541ms
- (2%) Task 7: 81ms
- (0%) LIR->LIR@com.android.tools.r8.internal.Y90: 1308ms
- (0%) Clear code rewritings: 416ms
- (0%) VerticalClassMerger (1/3): 7809ms
- (0%) Unaccounted: 110ms
- (0%) Setup: 123ms
- (0%) Compute classes to merge: 651ms
- MERGE Compute classes to merge: 2407ms, tasks: 6301, threads: 5, utilization: 73%
- (1%) NoDirectlyInstantiatedClassesPolicy: 39ms
- (0%) NoInterfacesWithUnknownSubtypesPolicy: 21ms
- (0%) NoKeptClassesPolicy: 13ms
- (2%) SameFeatureSplitPolicy: 57ms
- (0%) SameStartupPartitionPolicy: 5ms
- (0%) NoServiceInterfacesPolicy: 13ms
- (0%) NoAnnotationClassesPolicy: 1ms
- (1%) NoNonSerializableClassIntoSerializableClassPolicy: 24ms
- (0%) NoEnclosingMethodAttributesPolicy: 2ms
- (0%) NoInnerClassAttributesPolicy: 14ms
- (0%) SameNestPolicy: 10ms
- (0%) SameMainDexGroupPolicy: 20ms
- (1%) NoLockMergingPolicy: 39ms
- (6%) SameApiReferenceLevelPolicy: 147ms
- (1%) NoFieldResolutionChangesPolicy: 42ms
- (6%) NoMethodResolutionChangesPolicy: 150ms
- (9%) NoIllegalAccessesPolicy: 237ms
- (10%) NoClassInitializationChangesPolicy: 245ms
- (2%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 56ms
- (7%) NoInvokeSuperNoSuchMethodErrorsPolicy: 186ms
- (2%) SuccessfulVirtualMethodResolutionInTargetPolicy: 61ms
- (3%) NoAbstractMethodsOnAbstractClassesPolicy: 95ms
- (0%) NoNestedMergingPolicy: 14ms
- SLOWEST (5%) Compute classes to merge in component: 126ms
- (0%) NoDirectlyInstantiatedClassesPolicy: 5ms
- (0%) NoInterfacesWithUnknownSubtypesPolicy: 2ms
- (0%) NoKeptClassesPolicy: 1ms
- (0%) SameFeatureSplitPolicy: 0ms
- (0%) SameStartupPartitionPolicy: 1ms
- (0%) NoServiceInterfacesPolicy: 0ms
- (0%) NoAnnotationClassesPolicy: 0ms
- (0%) NoNonSerializableClassIntoSerializableClassPolicy: 6ms
- (0%) NoEnclosingMethodAttributesPolicy: 0ms
- (0%) NoInnerClassAttributesPolicy: 1ms
- (0%) SameNestPolicy: 0ms
- (0%) SameMainDexGroupPolicy: 0ms
- (0%) NoLockMergingPolicy: 1ms
- (0%) SameApiReferenceLevelPolicy: 21ms
- (0%) NoFieldResolutionChangesPolicy: 0ms
- (1%) NoMethodResolutionChangesPolicy: 26ms
- (0%) NoIllegalAccessesPolicy: 6ms
- (0%) NoClassInitializationChangesPolicy: 3ms
- (0%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 1ms
- (0%) NoInvokeSuperNoSuchMethodErrorsPolicy: 5ms
- (0%) SuccessfulVirtualMethodResolutionInTargetPolicy: 2ms
- (0%) NoAbstractMethodsOnAbstractClassesPolicy: 2ms
- (0%) NoNestedMergingPolicy: 0ms
- (0%) Merge classes: 461ms
- MERGE Merge classes: 2717ms, tasks: 1658, threads: 5, utilization: 117%
- SLOWEST (3%) Merge classes in component: 95ms
- (0%) Fixup: 1833ms
- (0%) Update keep info: 16ms
- (0%) Rewrite AppView: 1336ms
- (0%) Compute new member rebinding lens: 12ms
- MERGE Rewrite AppView concurrently: 3204ms, tasks: 7, threads: 5, utilization: 47%
- (41%) Task 1: 1319ms
- (1%) Unaccounted: 47ms
- (1%) Rewrite SyntheticItems: 41ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (25%) Rewrite FieldAccessInfoCollectionImpl: 803ms
- (3%) Unaccounted: 97ms
- (22%) Rewrite FieldAccessInfoImpl: 706ms
- (12%) Rewrite ObjectAllocationInfoCollectionImpl: 387ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 38ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 6ms
- (0%) Rewrite method info: 18ms
- (0%) Rewrite field info: 12ms
- (0%) Task 2: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 1ms
- (0%) Task 3: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 2ms
- (0%) Task 4: 0ms
- (0%) Task 5: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 2ms
- (15%) Task 6: 488ms
- (0%) Unaccounted: 0ms
- (15%) Rewrite RootSet: 488ms
- (0%) Unaccounted: 2ms
- (15%) Rewrite DependentMinimumKeepInfoCollection: 486ms
- (1%) Task 7: 63ms
- (0%) LIR->LIR@com.android.tools.r8.internal.Zt0: 3114ms
- (0%) Finalize synthesized bridges: 3ms
- (0%) Mark rewritten with lens: 159ms
- (0%) Unaccounted: 0ms
- (0%) Clear code rewritings: 159ms
- (34%) Create IR: 289246ms
- (0%) Unaccounted: 3881ms
- (1%) Argument propagator: 14875ms
- (0%) Unaccounted: 19ms
- (0%) Initialize code scanner: 1233ms
- (0%) Compute components: 92ms
- (0%) Compute optimization info: 7493ms
- (0%) Unaccounted: 8ms
- (0%) Propagate argument information for virtual methods: 741ms
- (0%) Solve flow constraints: 5555ms
- (0%) Set optimization info: 1189ms
- (0%) Unaccounted: 995ms
- (0%) Prune AppView: 193ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 152ms
- (0%) Prune AppServices: 1ms
- (0%) Prune AssumeInfoCollection: 0ms
- (0%) Prune RootSet: 38ms
- (0%) Compute unused arguments: 83ms
- (0%) Optimize components: 2681ms
- (0%) Build graph lens: 136ms
- (0%) Enqueue methods for reprocessing: 1489ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite methods to reprocess: 0ms
- (0%) Enqueue methods with non-trivial info: 292ms
- (0%) Enqueue affected methods: 663ms
- (0%) Eliminate dead field accesses: 532ms
- (0%) Fixup application: 382ms
- (0%) Fixup optimization info: 587ms
- (0%) Rewrite AppView: 675ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppView: 675ms
- (0%) Compute new member rebinding lens: 13ms
- MERGE Rewrite AppView concurrently: 1918ms, tasks: 7, threads: 5, utilization: 56%
- (34%) Task 1: 659ms
- (2%) Unaccounted: 42ms
- (1%) Rewrite SyntheticItems: 36ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (13%) Rewrite FieldAccessInfoCollectionImpl: 263ms
- (7%) Unaccounted: 137ms
- (6%) Rewrite FieldAccessInfoImpl: 125ms
- (14%) Rewrite ObjectAllocationInfoCollectionImpl: 272ms
- (0%) Rewrite call sites: 0ms
- (2%) Rewrite KeepInfoCollection: 45ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 5ms
- (1%) Rewrite method info: 23ms
- (0%) Rewrite field info: 15ms
- (0%) Task 2: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 2ms
- (0%) Task 3: 4ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 4ms
- (0%) Task 4: 0ms
- (0%) Task 5: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 2ms
- (28%) Task 6: 541ms
- (0%) Unaccounted: 0ms
- (28%) Rewrite RootSet: 541ms
- (0%) Unaccounted: 0ms
- (28%) Rewrite DependentMinimumKeepInfoCollection: 540ms
- (2%) Task 7: 43ms
- (1%) Build primary method processor: 16319ms
- (0%) Unaccounted: 5901ms
- (1%) Build IR processing order constraints: 10417ms
- (0%) Unaccounted: 4ms
- (0%) Build call graph: 6340ms
- (0%) Cycle elimination: 4072ms
- (21%) IR conversion phase 1: 183141ms
- MERGE primary-processor: 792386ms, tasks: 522943, threads: 5, utilization: 86%
- (1%) Lens rewrite: 9368ms
- (0%) Check for new-init issue: 917ms
- (0%) Rewrite assertions: 2065ms
- (0%) Run proto shrinking tasks: 118ms
- (1%) Propagate member values: 13002ms
- (0%) Remove switch maps: 1043ms
- (0%) InstanceInitializerOutliner: 1844ms
- (3%) Insert assume instructions: 26694ms
- (0%) Unaccounted: 319ms
- (2%) Part 1: Compute assumed values: 16664ms
- (0%) Part 2: Remove redundant assume instructions: 403ms
- (0%) Part 3: Compute dominated users: 3642ms
- (0%) Part 4: Remove redundant dominated assume instructions: 196ms
- (0%) Part 5: Materialize assume instructions: 5467ms
- (9%) Inlining: 74082ms
- (8%) Unaccounted: 64799ms
- (1%) Insert assume instructions: 9283ms
- (0%) Unaccounted: 334ms
- (0%) Part 1: Compute assumed values: 5058ms
- (0%) Part 2: Remove redundant assume instructions: 105ms
- (0%) Part 3: Compute dominated users: 1720ms
- (0%) Part 4: Remove redundant dominated assume instructions: 77ms
- (0%) Part 5: Materialize assume instructions: 1986ms
- (0%) Rewrite to const class: 2276ms
- (0%) StringOptimizer: 1788ms
- (1%) Optimize library methods: 9416ms
- (1%) Devirtualize invoke interface: 9877ms
- (0%) Rewrite AssertionError: 252ms
- (0%) TrivialCheckCastAndInstanceOfRemover: 7124ms
- (0%) EnumValueOptimizer: 3535ms
- (0%) KnownArrayLengthRewriter: 537ms
- (0%) NaturalIntLoopRemover: 1707ms
- (0%) CommonSubexpressionElimination: 5677ms
- (0%) ArrayConstructionSimplifier: 6055ms
- (0%) MoveResultRewriter: 7514ms
- (3%) StringBuilderAppendOptimizer: 27751ms
- (2%) SparseConditionalConstantPropagation: 21791ms
- (1%) ThrowCatchOptimizer: 11268ms
- (2%) BranchSimplifier: 18593ms
- (0%) SplitBranch: 2034ms
- (0%) RedundantConstNumberRemover: 163ms
- (3%) RedundantFieldLoadAndStoreElimination: 23867ms
- (0%) BinopRewriter: 2441ms
- (0%) ServiceLoaderRewriter: 441ms
- (0%) Optimize class initializers: 3473ms
- (7%) Remove dead code: 56135ms
- (6%) Unaccounted: 51156ms
- (0%) MoveResultRewriter: 4978ms
- (2%) Inline classes: 18501ms
- (2%) Collect outlines: 16973ms
- (0%) StringSwitchRemover: 394ms
- (2%) Canonicalize constants: 18497ms
- (1%) DexConstantOptimizer: 14711ms
- (0%) Compute and insert checkcast on return values: 1546ms
- (0%) Canonicalize idempotent calls: 4241ms
- (0%) Parent constructor hoisting pass: 1859ms
- (16%) Collect optimization info: 134675ms
- (2%) Unaccounted: 18316ms
- (2%) Argument propagation scanner: 19201ms
- (0%) Unaccounted: 3486ms
- (1%) Add method state: 11612ms
- (0%) Unaccounted: 1693ms
- (0%) Join temporary method state: 7698ms
- (0%) Unaccounted: 2963ms
- (0%) Compute method state for invoke: 4735ms
- (0%) Compute method state for invoke: 2220ms
- (0%) Add field state: 4103ms
- (0%) Unaccounted: 986ms
- (0%) Compute field state for field-put: 2650ms
- (0%) Join temporary field state: 466ms
- (1%) Multi caller inliner: Record call edges: 9747ms
- (1%) Analyze field accesses: 8028ms
- (0%) Identify bridge info: 2407ms
- (0%) Identify returns argument: 3854ms
- (3%) Compute class inlining constraint: 27899ms
- (0%) Unaccounted: 1379ms
- (2%) Data flow analysis: 22087ms
- (0%) Unaccounted: 4294ms
- (0%) Compute block entry state: 2488ms
- (1%) Compute transfers: 15305ms
- (0%) Externalize: 4431ms
- (0%) Compute enum unboxer method classification: 568ms
- (0%) Compute simple inlining constraint: 2426ms
- (0%) Compute dynamic return type: 3900ms
- (1%) Compute initialized classes on normal exits: 10086ms
- (0%) Compute instance initializer info: 4208ms
- (0%) Compute may have side effects: 5199ms
- (0%) Return value only depends on argument: 1305ms
- (0%) Compute non-null-param-or-throw: 4589ms
- (0%) Compute non-null-param-on-normal-exits: 3979ms
- (0%) Compute parameters with bitwise operations: 1293ms
- (0%) Compute unused arguments: 1225ms
- (0%) Analyze instance initializer: 4215ms
- (0%) Analyze class initializer: 2219ms
- (0%) Redundant catch/rethrow elimination: 1243ms
- (0%) Remove assume instructions: 2864ms
- (2%) Finalize IR: 19816ms
- (0%) Unaccounted: 5069ms
- (1%) Finalize LIR code: 14747ms
- SLOWEST (0%) void com.google.android.gms.internal.mlkit_vision_document_scanner.zzgi.<clinit>(): 1786ms
- (0%) Lens rewrite: 0ms
- (0%) Check for new-init issue: 0ms
- (0%) Rewrite assertions: 0ms
- (0%) Run proto shrinking tasks: 0ms
- (0%) Propagate member values: 0ms
- (0%) Remove switch maps: 0ms
- (0%) InstanceInitializerOutliner: 0ms
- (0%) Insert assume instructions: 2ms
- (0%) Unaccounted: 0ms
- (0%) Part 1: Compute assumed values: 1ms
- (0%) Part 2: Remove redundant assume instructions: 0ms
- (0%) Part 3: Compute dominated users: 0ms
- (0%) Part 4: Remove redundant dominated assume instructions: 0ms
- (0%) Part 5: Materialize assume instructions: 0ms
- (0%) Inlining: 140ms
- (0%) Unaccounted: 136ms
- (0%) Insert assume instructions: 3ms
- (0%) Unaccounted: 0ms
- (0%) Part 1: Compute assumed values: 3ms
- (0%) Rewrite to const class: 0ms
- (0%) StringOptimizer: 0ms
- (0%) Optimize library methods: 0ms
- (0%) Devirtualize invoke interface: 0ms
- (0%) Rewrite AssertionError: 0ms
- (0%) TrivialCheckCastAndInstanceOfRemover: 0ms
- (0%) EnumValueOptimizer: 0ms
- (0%) KnownArrayLengthRewriter: 0ms
- (0%) NaturalIntLoopRemover: 0ms
- (0%) CommonSubexpressionElimination: 0ms
- (0%) ArrayConstructionSimplifier: 0ms
- (0%) MoveResultRewriter: 12ms
- (0%) StringBuilderAppendOptimizer: 1ms
- (0%) SparseConditionalConstantPropagation: 8ms
- (0%) ThrowCatchOptimizer: 1ms
- (0%) BranchSimplifier: 0ms
- (0%) SplitBranch: 0ms
- (0%) RedundantConstNumberRemover: 0ms
- (0%) RedundantFieldLoadAndStoreElimination: 9ms
- (0%) BinopRewriter: 0ms
- (0%) ServiceLoaderRewriter: 0ms
- (0%) Optimize class initializers: 159ms
- (0%) Remove dead code: 34ms
- (0%) Unaccounted: 31ms
- (0%) MoveResultRewriter: 3ms
- (0%) Inline classes: 1375ms
- (0%) Collect outlines: 11ms
- (0%) StringSwitchRemover: 0ms
- (0%) Canonicalize constants: 5ms
- (0%) DexConstantOptimizer: 4ms
- (0%) Compute and insert checkcast on return values: 0ms
- (0%) Canonicalize idempotent calls: 0ms
- (0%) Parent constructor hoisting pass: 0ms
- (0%) Collect optimization info: 11ms
- (0%) Unaccounted: 1ms
- (0%) Argument propagation scanner: 4ms
- (0%) Unaccounted: 1ms
- (0%) Add field state: 0ms
- (0%) Unaccounted: 0ms
- (0%) Compute field state for field-put: 0ms
- (0%) Add method state: 2ms
- (0%) Unaccounted: 0ms
- (0%) Join temporary method state: 2ms
- (0%) Unaccounted: 1ms
- (0%) Compute method state for invoke: 0ms
- (0%) Multi caller inliner: Record call edges: 1ms
- (0%) Analyze field accesses: 0ms
- (0%) Analyze class initializer: 1ms
- (0%) Identify bridge info: 0ms
- (0%) Identify returns argument: 0ms
- (0%) Compute class inlining constraint: 0ms
- (0%) Compute enum unboxer method classification: 0ms
- (0%) Compute simple inlining constraint: 0ms
- (0%) Compute dynamic return type: 0ms
- (0%) Compute initialized classes on normal exits: 1ms
- (0%) Compute instance initializer info: 0ms
- (0%) Compute may have side effects: 0ms
- (0%) Return value only depends on argument: 0ms
- (0%) Compute non-null-param-or-throw: 0ms
- (0%) Compute non-null-param-on-normal-exits: 0ms
- (0%) Compute parameters with bitwise operations: 0ms
- (0%) Compute unused arguments: 0ms
- (0%) Redundant catch/rethrow elimination: 0ms
- (0%) Remove assume instructions: 0ms
- (0%) Finalize IR: 3ms
- (0%) Unaccounted: 0ms
- (0%) Finalize LIR code: 3ms
- (0%) Prune AppView: 821ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 776ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 1ms
- (0%) Prune RootSet: 43ms
- (0%) Multi caller inliner: 2806ms
- (0%) Unaccounted: 4ms
- (0%) Call graph construction: 2638ms
- (0%) Needs inlining analysis: 163ms
- (0%) Trivial field accesses analysis: 1499ms
- (0%) Unaccounted: 0ms
- (0%) Compute fields of interest: 204ms
- (0%) Enqueue methods for reprocessing: 1277ms
- (0%) Clear reads and writes from fields of interest: 17ms
- (0%) Unbox enums: 6ms
- (7%) IR conversion phase 2: 66438ms
- (0%) Unaccounted: 11ms
- (1%) Build post method processor: 11826ms
- (0%) Unaccounted: 4636ms
- (0%) Build IR processing order constraints: 7189ms
- (0%) Unaccounted: 0ms
- (0%) Build call graph: 4187ms
- (0%) Cycle elimination: 3002ms
- (6%) Process code: 54599ms
- MERGE secondary-processor: 202928ms, tasks: 136180, threads: 5, utilization: 74%
- (4%) Lens rewrite: 8918ms
- (0%) Check for new-init issue: 311ms
- (0%) Rewrite assertions: 452ms
- (0%) Run proto shrinking tasks: 49ms
- (1%) Propagate member values: 3555ms
- (0%) Remove switch maps: 224ms
- (0%) InstanceInitializerOutliner: 53ms
- (4%) Insert assume instructions: 8782ms
- (0%) Unaccounted: 81ms
- (2%) Part 1: Compute assumed values: 4537ms
- (0%) Part 2: Remove redundant assume instructions: 124ms
- (1%) Part 3: Compute dominated users: 2116ms
- (0%) Part 4: Remove redundant dominated assume instructions: 71ms
- (0%) Part 5: Materialize assume instructions: 1850ms
- (9%) Inlining: 19509ms
- (9%) Unaccounted: 18497ms
- (0%) Insert assume instructions: 1011ms
- (0%) Unaccounted: 29ms
- (0%) Part 1: Compute assumed values: 429ms
- (0%) Part 2: Remove redundant assume instructions: 8ms
- (0%) Part 3: Compute dominated users: 326ms
- (0%) Part 4: Remove redundant dominated assume instructions: 11ms
- (0%) Part 5: Materialize assume instructions: 205ms
- (0%) Rewrite to const class: 613ms
- (0%) StringOptimizer: 354ms
- (1%) Optimize library methods: 2201ms
- (1%) Devirtualize invoke interface: 2408ms
- (0%) TrivialCheckCastAndInstanceOfRemover: 2007ms
- (0%) EnumValueOptimizer: 937ms
- (0%) KnownArrayLengthRewriter: 197ms
- (0%) NaturalIntLoopRemover: 291ms
- (0%) CommonSubexpressionElimination: 1462ms
- (0%) ArrayConstructionSimplifier: 124ms
- (0%) MoveResultRewriter: 1663ms
- (3%) StringBuilderAppendOptimizer: 6749ms
- (2%) SparseConditionalConstantPropagation: 5814ms
- (1%) ThrowCatchOptimizer: 3994ms
- (1%) BranchSimplifier: 2941ms
- (0%) SplitBranch: 478ms
- (0%) RedundantConstNumberRemover: 26ms
- (2%) RedundantFieldLoadAndStoreElimination: 5643ms
- (0%) BinopRewriter: 393ms
- (0%) ServiceLoaderRewriter: 33ms
- (0%) Optimize class initializers: 304ms
- (7%) Remove dead code: 15825ms
- (7%) Unaccounted: 14384ms
- (0%) MoveResultRewriter: 1440ms
- (1%) Inline classes: 3136ms
- (2%) Collect outlines: 4249ms
- (0%) StringSwitchRemover: 62ms
- (1%) Canonicalize constants: 3375ms
- (1%) DexConstantOptimizer: 3848ms
- (0%) Compute and insert checkcast on return values: 286ms
- (0%) Canonicalize idempotent calls: 975ms
- (0%) Parent constructor hoisting pass: 276ms
- (9%) Collect optimization info: 19911ms
- (0%) Unaccounted: 715ms
- (0%) Analyze instance initializer: 1054ms
- (0%) Identify bridge info: 445ms
- (0%) Identify returns argument: 586ms
- (4%) Compute class inlining constraint: 8674ms
- (0%) Unaccounted: 427ms
- (3%) Data flow analysis: 6792ms
- (0%) Unaccounted: 1525ms
- (0%) Compute block entry state: 949ms
- (2%) Compute transfers: 4317ms
- (0%) Externalize: 1454ms
- (0%) Compute enum unboxer method classification: 158ms
- (0%) Compute simple inlining constraint: 478ms
- (0%) Compute dynamic return type: 674ms
- (1%) Compute initialized classes on normal exits: 2452ms
- (0%) Compute instance initializer info: 722ms
- (0%) Compute may have side effects: 1078ms
- (0%) Return value only depends on argument: 311ms
- (0%) Compute non-null-param-or-throw: 829ms
- (0%) Compute non-null-param-on-normal-exits: 1179ms
- (0%) Compute parameters with bitwise operations: 293ms
- (0%) Compute unused arguments: 128ms
- (0%) Analyze class initializer: 127ms
- (0%) Redundant catch/rethrow elimination: 203ms
- (0%) Remove assume instructions: 893ms
- (2%) Finalize IR: 5666ms
- (0%) Unaccounted: 1354ms
- (2%) Finalize LIR code: 4311ms
- SLOWEST (0%) java.lang.Object com.google.android.gms.internal.ads.zzati.zzde(com.google.android.gms.internal.ads.zzhbn, com.google.android.gms.internal.ads.zzhbo): 534ms
- (0%) Lens rewrite: 0ms
- (0%) Check for new-init issue: 0ms
- (0%) Rewrite assertions: 0ms
- (0%) Run proto shrinking tasks: 0ms
- (0%) Propagate member values: 0ms
- (0%) Remove switch maps: 0ms
- (0%) InstanceInitializerOutliner: 0ms
- (0%) Insert assume instructions: 0ms
- (0%) Unaccounted: 0ms
- (0%) Part 1: Compute assumed values: 0ms
- (0%) Part 2: Remove redundant assume instructions: 0ms
- (0%) Part 3: Compute dominated users: 0ms
- (0%) Part 4: Remove redundant dominated assume instructions: 0ms
- (0%) Part 5: Materialize assume instructions: 0ms
- (0%) Inlining: 249ms
- (0%) Unaccounted: 249ms
- (0%) Insert assume instructions: 0ms
- (0%) Unaccounted: 0ms
- (0%) Part 1: Compute assumed values: 0ms
- (0%) Rewrite to const class: 0ms
- (0%) StringOptimizer: 0ms
- (0%) Optimize library methods: 15ms
- (0%) Devirtualize invoke interface: 4ms
- (0%) TrivialCheckCastAndInstanceOfRemover: 0ms
- (0%) EnumValueOptimizer: 1ms
- (0%) KnownArrayLengthRewriter: 0ms
- (0%) NaturalIntLoopRemover: 0ms
- (0%) CommonSubexpressionElimination: 0ms
- (0%) ArrayConstructionSimplifier: 0ms
- (0%) MoveResultRewriter: 4ms
- (0%) StringBuilderAppendOptimizer: 7ms
- (0%) SparseConditionalConstantPropagation: 22ms
- (0%) ThrowCatchOptimizer: 13ms
- (0%) BranchSimplifier: 10ms
- (0%) SplitBranch: 0ms
- (0%) RedundantConstNumberRemover: 0ms
- (0%) RedundantFieldLoadAndStoreElimination: 28ms
- (0%) BinopRewriter: 0ms
- (0%) ServiceLoaderRewriter: 0ms
- (0%) Optimize class initializers: 0ms
- (0%) Remove dead code: 2ms
- (0%) Unaccounted: 2ms
- (0%) MoveResultRewriter: 0ms
- (0%) Inline classes: 6ms
- (0%) Collect outlines: 43ms
- (0%) StringSwitchRemover: 0ms
- (0%) Canonicalize constants: 12ms
- (0%) DexConstantOptimizer: 4ms
- (0%) Compute and insert checkcast on return values: 0ms
- (0%) Canonicalize idempotent calls: 4ms
- (0%) Parent constructor hoisting pass: 0ms
- (0%) Collect optimization info: 86ms
- (0%) Unaccounted: 0ms
- (0%) Identify bridge info: 1ms
- (0%) Identify returns argument: 0ms
- (0%) Compute class inlining constraint: 4ms
- (0%) Unaccounted: 0ms
- (0%) Data flow analysis: 4ms
- (0%) Unaccounted: 1ms
- (0%) Compute block entry state: 1ms
- (0%) Compute transfers: 0ms
- (0%) Externalize: 0ms
- (0%) Compute enum unboxer method classification: 0ms
- (0%) Compute simple inlining constraint: 5ms
- (0%) Compute dynamic return type: 67ms
- (0%) Compute initialized classes on normal exits: 0ms
- (0%) Compute instance initializer info: 0ms
- (0%) Compute may have side effects: 0ms
- (0%) Return value only depends on argument: 5ms
- (0%) Compute non-null-param-or-throw: 0ms
- (0%) Compute non-null-param-on-normal-exits: 0ms
- (0%) Compute parameters with bitwise operations: 1ms
- (0%) Compute unused arguments: 0ms
- (0%) Redundant catch/rethrow elimination: 0ms
- (0%) Remove assume instructions: 0ms
- (0%) Finalize IR: 13ms
- (0%) Unaccounted: 9ms
- (0%) Finalize LIR code: 3ms
- (0%) Update visible optimization info: 0ms
- (0%) IR conversion phase 3: 3083ms
- (0%) AppliedGraphLens construction: 1190ms
- (23%) Post optimization code stripping: 195687ms
- (0%) Unaccounted: 1435ms
- (0%) Register analysis: 0ms
- (0%) Transfer minimum keep info: 765ms
- (0%) Retain keep info: 19ms
- (0%) Unconditional rules: 0ms
- (0%) Enqueue all: 0ms
- (22%) Trace: 188919ms
- (0%) Unaccounted: 0ms
- (22%) Grow the tree.: 188919ms
- (21%) Unaccounted: 178634ms
- (0%) Conditional rules: 0ms
- (1%) Find consequent items for -if rules...: 10285ms
- (0%) Finalize library override: 77ms
- (0%) Finish analysis: 526ms
- (0%) Finish compat building: 0ms
- (0%) Create result: 1111ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite with deferred results: 630ms
- (0%) Remove dead protos: 0ms
- (0%) Prune field access mappings: 24ms
- (0%) Prune dead items: 218ms
- (0%) Unaccounted: 0ms
- (0%) Prune keep info: 218ms
- (0%) Prune others: 0ms
- (0%) Ensure static factory references: 1ms
- (0%) Rebuild application: 31ms
- (0%) Create app info with liveness: 204ms
- (0%) Pruning application: 1585ms
- (0%) Unaccounted: 781ms
- (0%) Prune AppView: 804ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 766ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 1ms
- (0%) Prune RootSet: 35ms
- (0%) Prune NonEmptyOpenClosedInterfacesCollection: 0ms
- (0%) Bridge hoisting: 1185ms
- (0%) Unaccounted: 213ms
- (0%) Rewrite AppView: 971ms
- (0%) Compute new member rebinding lens: 0ms
- MERGE Rewrite AppView concurrently: 2387ms, tasks: 6, threads: 5, utilization: 49%
- (40%) Task 1: 969ms
- (8%) Unaccounted: 209ms
- (1%) Rewrite SyntheticItems: 26ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (24%) Rewrite FieldAccessInfoCollectionImpl: 572ms
- (2%) Unaccounted: 55ms
- (21%) Rewrite FieldAccessInfoImpl: 517ms
- (5%) Rewrite ObjectAllocationInfoCollectionImpl: 123ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 36ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 18ms
- (0%) Rewrite field info: 12ms
- (0%) Task 2: 3ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 3ms
- (0%) Task 3: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 2ms
- (0%) Task 4: 0ms
- (0%) Task 5: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 2ms
- (18%) Task 6: 437ms
- (0%) Unaccounted: 0ms
- (18%) Rewrite RootSet: 437ms
- (0%) Unaccounted: 0ms
- (18%) Rewrite DependentMinimumKeepInfoCollection: 437ms
- (0%) Finalize fields pass: 61ms
- (7%) Run postlude: 64532ms
- (0%) Unaccounted: 1100ms
- (0%) Bridge remover: 1604ms
- (0%) Unaccounted: 28ms
- (0%) Redundant bridge removal: 1576ms
- (0%) Unaccounted: 237ms
- (0%) Prune AppView: 438ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 407ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 0ms
- (0%) Prune RootSet: 30ms
- (0%) Rewrite AppView: 899ms
- (0%) Compute new member rebinding lens: 2ms
- MERGE Rewrite AppView concurrently: 2132ms, tasks: 6, threads: 5, utilization: 47%
- (41%) Task 1: 894ms
- (5%) Unaccounted: 114ms
- (0%) Rewrite SyntheticItems: 17ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (28%) Rewrite FieldAccessInfoCollectionImpl: 606ms
- (2%) Unaccounted: 56ms
- (25%) Rewrite FieldAccessInfoImpl: 549ms
- (5%) Rewrite ObjectAllocationInfoCollectionImpl: 116ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 39ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 20ms
- (0%) Rewrite field info: 14ms
- (0%) Task 2: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 0ms
- (0%) Task 3: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 0ms
- (0%) Task 4: 5ms
- (0%) Unaccounted: 1ms
- (0%) Rewrite FinalInitClassLens: 4ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (15%) Task 6: 335ms
- (0%) Unaccounted: 0ms
- (15%) Rewrite RootSet: 335ms
- (0%) Unaccounted: 0ms
- (15%) Rewrite DependentMinimumKeepInfoCollection: 335ms
- (0%) Method equivalence: 147ms
- (0%) Unaccounted: 8ms
- (0%) Potential equivalences: 84ms
- (0%) Groups: 44ms
- (0%) External creation: 8ms
- (0%) Class equivalence: 754ms
- (0%) Unaccounted: 25ms
- (0%) Potential equivalences: 633ms
- (0%) Groups: 52ms
- (0%) External creation: 43ms
- (0%) Tree fixing: 1131ms
- (0%) Add final synthetics: 10ms
- (0%) Finish lens: 67ms
- (0%) Rewrite AppView: 1439ms
- (0%) Compute new member rebinding lens: 2ms
- MERGE Rewrite AppView concurrently: 3447ms, tasks: 6, threads: 5, utilization: 47%
- (41%) Task 1: 1433ms
- (9%) Unaccounted: 322ms
- (0%) Rewrite SyntheticItems: 24ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (27%) Rewrite FieldAccessInfoCollectionImpl: 939ms
- (2%) Unaccounted: 89ms
- (24%) Rewrite FieldAccessInfoImpl: 849ms
- (3%) Rewrite ObjectAllocationInfoCollectionImpl: 107ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 39ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 19ms
- (0%) Rewrite field info: 14ms
- (0%) Task 2: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 1ms
- (0%) Task 3: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 2ms
- (0%) Task 4: 6ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 6ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (16%) Task 6: 562ms
- (0%) Unaccounted: 0ms
- (16%) Rewrite RootSet: 562ms
- (0%) Unaccounted: 0ms
- (16%) Rewrite DependentMinimumKeepInfoCollection: 561ms
- (0%) Prune AppView: 464ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 429ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 0ms
- (0%) Prune RootSet: 34ms
- (0%) Prune NonEmptyOpenClosedInterfacesCollection: 0ms
- (0%) read -applymapping file: 0ms
- (1%) Repackage classes: 8817ms
- (0%) Unaccounted: 7095ms
- (0%) Rewrite AppView: 1721ms
- (0%) Compute new member rebinding lens: 1ms
- MERGE Rewrite AppView concurrently: 3928ms, tasks: 6, threads: 5, utilization: 45%
- (43%) Task 1: 1718ms
- (8%) Unaccounted: 317ms
- (1%) Rewrite SyntheticItems: 51ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (30%) Rewrite FieldAccessInfoCollectionImpl: 1178ms
- (1%) Unaccounted: 56ms
- (28%) Rewrite FieldAccessInfoImpl: 1121ms
- (3%) Rewrite ObjectAllocationInfoCollectionImpl: 121ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 49ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 5ms
- (0%) Rewrite method info: 25ms
- (0%) Rewrite field info: 19ms
- (0%) Task 2: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 0ms
- (0%) Task 3: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 0ms
- (0%) Task 4: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 2ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (12%) Task 6: 486ms
- (0%) Unaccounted: 0ms
- (12%) Rewrite RootSet: 486ms
- (0%) Unaccounted: 0ms
- (12%) Rewrite DependentMinimumKeepInfoCollection: 486ms
- (0%) LIR->LIR@com.android.tools.r8.internal.Rc0: 1042ms
- (0%) Clear code rewritings: 183ms
- (0%) VerticalClassMerger (2/3): 4798ms
- (0%) Unaccounted: 26ms
- (0%) Setup: 114ms
- (0%) Compute classes to merge: 344ms
- MERGE Compute classes to merge: 1031ms, tasks: 4176, threads: 5, utilization: 59%
- (1%) NoDirectlyInstantiatedClassesPolicy: 15ms
- (0%) NoInterfacesWithUnknownSubtypesPolicy: 3ms
- (0%) NoKeptClassesPolicy: 7ms
- (0%) SameFeatureSplitPolicy: 9ms
- (0%) SameStartupPartitionPolicy: 0ms
- (1%) NoServiceInterfacesPolicy: 10ms
- (0%) NoAnnotationClassesPolicy: 0ms
- (1%) NoNonSerializableClassIntoSerializableClassPolicy: 11ms
- (0%) NoEnclosingMethodAttributesPolicy: 0ms
- (0%) NoInnerClassAttributesPolicy: 0ms
- (0%) SameNestPolicy: 0ms
- (0%) SameMainDexGroupPolicy: 4ms
- (1%) NoLockMergingPolicy: 13ms
- (4%) SameApiReferenceLevelPolicy: 42ms
- (1%) NoFieldResolutionChangesPolicy: 11ms
- (9%) NoMethodResolutionChangesPolicy: 98ms
- (12%) NoIllegalAccessesPolicy: 125ms
- (1%) NoClassInitializationChangesPolicy: 19ms
- (2%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 24ms
- (16%) NoInvokeSuperNoSuchMethodErrorsPolicy: 165ms
- (0%) SuccessfulVirtualMethodResolutionInTargetPolicy: 7ms
- (0%) NoAbstractMethodsOnAbstractClassesPolicy: 4ms
- (0%) NoNestedMergingPolicy: 2ms
- SLOWEST (12%) Compute classes to merge in component: 131ms
- (0%) NoDirectlyInstantiatedClassesPolicy: 4ms
- (0%) NoInterfacesWithUnknownSubtypesPolicy: 0ms
- (0%) NoKeptClassesPolicy: 0ms
- (0%) SameFeatureSplitPolicy: 0ms
- (0%) SameStartupPartitionPolicy: 0ms
- (0%) NoServiceInterfacesPolicy: 0ms
- (0%) NoAnnotationClassesPolicy: 0ms
- (0%) NoNonSerializableClassIntoSerializableClassPolicy: 2ms
- (0%) NoEnclosingMethodAttributesPolicy: 0ms
- (0%) NoInnerClassAttributesPolicy: 0ms
- (0%) SameNestPolicy: 0ms
- (0%) SameMainDexGroupPolicy: 0ms
- (0%) NoLockMergingPolicy: 0ms
- (0%) SameApiReferenceLevelPolicy: 9ms
- (0%) NoFieldResolutionChangesPolicy: 8ms
- (1%) NoMethodResolutionChangesPolicy: 16ms
- (4%) NoIllegalAccessesPolicy: 43ms
- (0%) NoClassInitializationChangesPolicy: 1ms
- (0%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 0ms
- (1%) NoInvokeSuperNoSuchMethodErrorsPolicy: 19ms
- (0%) SuccessfulVirtualMethodResolutionInTargetPolicy: 0ms
- (0%) NoAbstractMethodsOnAbstractClassesPolicy: 0ms
- (0%) NoNestedMergingPolicy: 0ms
- (0%) Merge classes: 134ms
- MERGE Merge classes: 680ms, tasks: 455, threads: 5, utilization: 101%
- SLOWEST (5%) Merge classes in component: 40ms
- (0%) Fixup: 1247ms
- (0%) Update keep info: 5ms
- (0%) Rewrite AppView: 1002ms
- (0%) Compute new member rebinding lens: 1ms
- MERGE Rewrite AppView concurrently: 2444ms, tasks: 6, threads: 5, utilization: 48%
- (40%) Task 1: 997ms
- (8%) Unaccounted: 204ms
- (0%) Rewrite SyntheticItems: 17ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (26%) Rewrite FieldAccessInfoCollectionImpl: 644ms
- (2%) Unaccounted: 53ms
- (24%) Rewrite FieldAccessInfoImpl: 591ms
- (3%) Rewrite ObjectAllocationInfoCollectionImpl: 94ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 36ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 18ms
- (0%) Rewrite field info: 12ms
- (0%) Task 2: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 2ms
- (0%) Task 3: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 0ms
- (0%) Task 4: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 1ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (17%) Task 6: 434ms
- (0%) Unaccounted: 0ms
- (17%) Rewrite RootSet: 434ms
- (0%) Unaccounted: 0ms
- (17%) Rewrite DependentMinimumKeepInfoCollection: 434ms
- (0%) LIR->LIR@com.android.tools.r8.internal.Zt0: 1336ms
- (0%) Remove merged classes: 488ms
- (0%) Unaccounted: 53ms
- (0%) Pruning AppInfoWithLiveness: 434ms
- (0%) Finalize synthesized bridges: 0ms
- (0%) Mark rewritten with lens: 98ms
- (0%) Unaccounted: 0ms
- (0%) Clear code rewritings: 98ms
- (2%) HorizontalClassMerger: 24610ms
- (0%) Unaccounted: 4168ms
- (0%) CheckSyntheticClasses: 24ms
- (0%) NoCheckDiscard: 23ms
- (0%) NoKeepRules: 18ms
- (0%) NoClassInitializerWithObservableSideEffects: 32ms
- (0%) NoResourceClasses: 118ms
- (0%) NotMatchedByNoHorizontalClassMerging: 16ms
- (0%) NoAnnotationClasses: 16ms
- (0%) NoDirectRuntimeTypeChecks: 21ms
- (0%) NoEnums: 24ms
- (0%) NoFailedResolutionTargets: 8ms
- (0%) NoInterfaces: 10ms
- (0%) NoInnerClasses: 12ms
- (0%) NoInstanceFieldAnnotations: 27ms
- (0%) NoKotlinMetadata: 16ms
- (0%) NoNativeMethods: 45ms
- (0%) NoServiceLoaders: 14ms
- (0%) NoRecords: 14ms
- (0%) CheckAbstractClasses: 24ms
- (0%) NoClassAnnotationCollisions: 7ms
- (0%) SameFeatureSplit: 25ms
- (0%) SameInstanceFields: 85ms
- (0%) SameMainDexGroup: 21ms
- (0%) SameNestHost: 15ms
- (0%) SameParentClass: 6ms
- (0%) SyntheticItemsPolicy: 14ms
- (0%) RespectPackageBoundaries: 1030ms
- (0%) NoDifferentApiReferenceLevel: 71ms
- (0%) NoIndirectRuntimeTypeChecks: 34ms
- (0%) NoWeakerAccessPriviledges: 1858ms
- (0%) PreventClassMethodAndDefaultMethodCollisions: 4620ms
- (0%) NoClassInitializerCycles: 5386ms
- (0%) NoDeadLocks: 32ms
- (0%) PreserveMethodCharacteristics: 78ms
- (0%) MinimizeFieldCasts: 56ms
- (0%) NoDefaultInterfaceMethodMerging: 64ms
- (0%) LimitInterfaceGroups: 4ms
- (0%) LimitGroups: 8ms
- (0%) FinalizeMergeGroup: 128ms
- (0%) Undo constructor inlining: 889ms
- (0%) Fixup: 1598ms
- (0%) Rewrite AppView: 1386ms
- (0%) Compute new member rebinding lens: 1ms
- MERGE Rewrite AppView concurrently: 3131ms, tasks: 6, threads: 5, utilization: 45%
- (44%) Task 1: 1382ms
- (4%) Unaccounted: 130ms
- (1%) Rewrite SyntheticItems: 32ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (34%) Rewrite FieldAccessInfoCollectionImpl: 1094ms
- (6%) Unaccounted: 203ms
- (28%) Rewrite FieldAccessInfoImpl: 890ms
- (2%) Rewrite ObjectAllocationInfoCollectionImpl: 83ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 41ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 20ms
- (0%) Rewrite field info: 16ms
- (0%) Task 2: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 1ms
- (0%) Task 3: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 0ms
- (0%) Task 4: 9ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 8ms
- (0%) Task 5: 1ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 1ms
- (11%) Task 6: 351ms
- (0%) Unaccounted: 0ms
- (11%) Rewrite RootSet: 351ms
- (0%) Unaccounted: 0ms
- (11%) Rewrite DependentMinimumKeepInfoCollection: 351ms
- (0%) LIR->LIR@com.android.tools.r8.internal.sz: 2002ms
- (0%) Clear code rewritings: 109ms
- (0%) Prune AppView: 430ms
- (0%) Unaccounted: 0ms
- (0%) Pruning AppInfoWithLiveness: 395ms
- (0%) Prune AppServices: 0ms
- (0%) Prune AssumeInfoCollection: 0ms
- (0%) Prune RootSet: 34ms
- (0%) Prune NonEmptyOpenClosedInterfacesCollection: 0ms
- (0%) VerticalClassMerger (3/3): 3600ms
- (0%) Unaccounted: 17ms
- (0%) Setup: 90ms
- (0%) Compute classes to merge: 263ms
- MERGE Compute classes to merge: 539ms, tasks: 3248, threads: 5, utilization: 40%
- (2%) NoDirectlyInstantiatedClassesPolicy: 11ms
- (1%) NoInterfacesWithUnknownSubtypesPolicy: 6ms
- (0%) NoKeptClassesPolicy: 1ms
- (1%) SameFeatureSplitPolicy: 10ms
- (0%) SameStartupPartitionPolicy: 0ms
- (0%) NoServiceInterfacesPolicy: 3ms
- (0%) NoAnnotationClassesPolicy: 0ms
- (0%) NoNonSerializableClassIntoSerializableClassPolicy: 1ms
- (0%) NoEnclosingMethodAttributesPolicy: 0ms
- (0%) NoInnerClassAttributesPolicy: 0ms
- (0%) SameNestPolicy: 0ms
- (0%) SameMainDexGroupPolicy: 0ms
- (0%) NoLockMergingPolicy: 1ms
- (19%) SameApiReferenceLevelPolicy: 103ms
- (0%) NoFieldResolutionChangesPolicy: 2ms
- (0%) NoMethodResolutionChangesPolicy: 4ms
- (3%) NoIllegalAccessesPolicy: 20ms
- (1%) NoClassInitializationChangesPolicy: 6ms
- (0%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 1ms
- (5%) NoInvokeSuperNoSuchMethodErrorsPolicy: 31ms
- (0%) SuccessfulVirtualMethodResolutionInTargetPolicy: 1ms
- (0%) NoAbstractMethodsOnAbstractClassesPolicy: 2ms
- (0%) NoNestedMergingPolicy: 0ms
- SLOWEST (8%) Compute classes to merge in component: 47ms
- (0%) NoDirectlyInstantiatedClassesPolicy: 0ms
- (0%) NoInterfacesWithUnknownSubtypesPolicy: 0ms
- (0%) NoKeptClassesPolicy: 0ms
- (1%) SameFeatureSplitPolicy: 8ms
- (0%) SameStartupPartitionPolicy: 0ms
- (0%) NoServiceInterfacesPolicy: 0ms
- (0%) NoAnnotationClassesPolicy: 0ms
- (0%) NoNonSerializableClassIntoSerializableClassPolicy: 0ms
- (0%) NoEnclosingMethodAttributesPolicy: 0ms
- (0%) NoInnerClassAttributesPolicy: 0ms
- (0%) SameNestPolicy: 0ms
- (0%) SameMainDexGroupPolicy: 0ms
- (0%) NoLockMergingPolicy: 0ms
- (3%) SameApiReferenceLevelPolicy: 18ms
- (0%) NoFieldResolutionChangesPolicy: 1ms
- (0%) NoMethodResolutionChangesPolicy: 3ms
- (0%) NoIllegalAccessesPolicy: 1ms
- (0%) NoClassInitializationChangesPolicy: 1ms
- (0%) NoInterfacesWithInvokeSpecialToDefaultMethodIntoClassPolicy: 0ms
- (1%) NoInvokeSuperNoSuchMethodErrorsPolicy: 5ms
- (0%) SuccessfulVirtualMethodResolutionInTargetPolicy: 0ms
- (0%) NoAbstractMethodsOnAbstractClassesPolicy: 0ms
- (0%) NoNestedMergingPolicy: 0ms
- (0%) Merge classes: 40ms
- MERGE Merge classes: 235ms, tasks: 90, threads: 5, utilization: 115%
- SLOWEST (9%) Merge classes in component: 23ms
- (0%) Fixup: 966ms
- (0%) Update keep info: 8ms
- (0%) Rewrite AppView: 1091ms
- (0%) Compute new member rebinding lens: 5ms
- MERGE Rewrite AppView concurrently: 2789ms, tasks: 6, threads: 5, utilization: 51%
- (38%) Task 1: 1081ms
- (11%) Unaccounted: 316ms
- (0%) Rewrite SyntheticItems: 17ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (23%) Rewrite FieldAccessInfoCollectionImpl: 653ms
- (1%) Unaccounted: 49ms
- (21%) Rewrite FieldAccessInfoImpl: 604ms
- (1%) Rewrite ObjectAllocationInfoCollectionImpl: 54ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 39ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 5ms
- (0%) Rewrite method info: 20ms
- (0%) Rewrite field info: 14ms
- (0%) Task 2: 5ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 5ms
- (0%) Task 3: 5ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 4ms
- (0%) Task 4: 13ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 13ms
- (0%) Task 5: 4ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 4ms
- (21%) Task 6: 591ms
- (0%) Unaccounted: 0ms
- (21%) Rewrite RootSet: 591ms
- (0%) Unaccounted: 0ms
- (21%) Rewrite DependentMinimumKeepInfoCollection: 591ms
- (0%) LIR->LIR@com.android.tools.r8.internal.Zt0: 542ms
- (0%) Remove merged classes: 369ms
- (0%) Unaccounted: 19ms
- (0%) Pruning AppInfoWithLiveness: 349ms
- (0%) Finalize synthesized bridges: 0ms
- (0%) Mark rewritten with lens: 208ms
- (0%) Unaccounted: 0ms
- (0%) Clear code rewritings: 208ms
- (0%) SingleCallerInliner: 6256ms
- (0%) Proto normalization: 3390ms
- (0%) Unaccounted: 936ms
- (0%) Rewrite AppView: 819ms
- (0%) Compute new member rebinding lens: 1ms
- MERGE Rewrite AppView concurrently: 2172ms, tasks: 6, threads: 5, utilization: 53%
- (37%) Task 1: 815ms
- (7%) Unaccounted: 158ms
- (0%) Rewrite SyntheticItems: 4ms
- (0%) Rewrite ClassToFeatureSplitMap: 0ms
- (0%) Rewrite MainDexInfo: 0ms
- (0%) Rewrite fields: 0ms
- (25%) Rewrite FieldAccessInfoCollectionImpl: 554ms
- (2%) Unaccounted: 44ms
- (23%) Rewrite FieldAccessInfoImpl: 509ms
- (2%) Rewrite ObjectAllocationInfoCollectionImpl: 57ms
- (0%) Rewrite call sites: 0ms
- (1%) Rewrite KeepInfoCollection: 40ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite class info: 4ms
- (0%) Rewrite method info: 21ms
- (0%) Rewrite field info: 14ms
- (0%) Task 2: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AppServices: 0ms
- (0%) Task 3: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite AssumeInfoCollection: 0ms
- (0%) Task 4: 2ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite FinalInitClassLens: 2ms
- (0%) Task 5: 0ms
- (0%) Unaccounted: 0ms
- (0%) Rewrite NonEmptyOpenClosedInterfacesCollection: 0ms
- (24%) Task 6: 535ms
- (0%) Unaccounted: 0ms
- (24%) Rewrite RootSet: 535ms
- (0%) Unaccounted: 0ms
- (24%) Rewrite DependentMinimumKeepInfoCollection: 534ms
- (0%) LIR->LIR@com.android.tools.r8.internal.B80: 1487ms
- (0%) Clear code rewritings: 147ms
- (0%) Minification: 4004ms
- (0%) Unaccounted: 689ms
- (0%) ComputeInterfaces: 45ms
- (0%) MinifyClasses: 453ms
- (0%) Unaccounted: 66ms
- (0%) reserve: 63ms
- (0%) rename-classes: 140ms
- (0%) rename-dangling-types: 183ms
- (0%) MinifyMethods: 1929ms
- (0%) Unaccounted: 4ms
- (0%) Phase 1: 523ms
- (0%) Phase 2: 18ms
- (0%) Phase 3: 886ms
- (0%) Unaccounted: 0ms
- (0%) Interface minification: 886ms
- (0%) Unaccounted: 0ms
- (0%) Reserve direct and compute hierarchy: 19ms
- (0%) Compute map: 84ms
- (0%) Union-find: 1ms
- (0%) States for union: 0ms
- (0%) Sort: 18ms
- (0%) Reserve in groups: 304ms
- (0%) Rename in groups: 458ms
- (0%) Phase 4: 497ms
- (0%) MinifyFields: 519ms
- (0%) Unaccounted: 1ms
- (0%) reserve-names: 204ms
- (0%) rename-definitions: 313ms
- (0%) non-rebound-references: 366ms
- (0%) MinifyIdentifiers: 31ms
- (0%) MinifyKotlinMetadata: 1075ms
- (2%) LIR->IR->DEX: 24549ms
- (3%) DexApplication.write: 31920ms
- (0%) Insert Attribute Annotations: 284ms
- (0%) Set call-site contexts: 110ms
- (0%) Distribute: 2932ms
- (0%) Sort Annotations: 196ms
- MERGE Pre-write phase: 6082ms, tasks: 6, threads: 5, utilization: 3%
- (61%) Compute object offset mapping: 3767ms
- (0%) Unaccounted: 33ms
- (8%) Sort strings: 533ms
- (12%) Sort types: 764ms
- (5%) Sort classes: 359ms
- (14%) Sort protos: 859ms
- (11%) Sort methods: 692ms
- (8%) Sort fields: 524ms
- (0%) Sort call-sites: 0ms
- (0%) Sort method handles: 0ms
- (0%) Rewrite jumbo strings: 0ms
- SLOWEST (16%) VirtualFile 0: 1009ms
- (12%) Compute object offset mapping: 756ms
- (0%) Unaccounted: 6ms
- (1%) Sort strings: 113ms
- (2%) Sort types: 123ms
- (1%) Sort classes: 91ms
- (3%) Sort protos: 183ms
- (2%) Sort methods: 128ms
- (1%) Sort fields: 109ms
- (0%) Sort call-sites: 0ms
- (0%) Sort method handles: 0ms
- (0%) Rewrite jumbo strings: 0ms
- (1%) Line number remapping: 12906ms
- (0%) Write proguard map: 8252ms
- (0%) Compute lazy strings: 8ms
- MERGE Write files: 32953ms, tasks: 6, threads: 5, utilization: 20%
- (1%) Reindex for lazy strings: 408ms
- (60%) Write bytes: 19772ms
- (0%) Unaccounted: 55ms
- (8%) collect: 2711ms
- (51%) generate: 17005ms
- (20%) Pass bytes to consumer: 6883ms
- SLOWEST (17%) VirtualFile 3: 5857ms
- (0%) Reindex for lazy strings: 80ms
- (11%) Write bytes: 3906ms
- (0%) Unaccounted: 12ms
- (1%) collect: 514ms
- (10%) generate: 3379ms
- (5%) Pass bytes to consumer: 1870ms
It also appears to be running with jdk-11, whereas our CI is using JDK 17.
In addition to there was also these logs:
Unable to setup art profile rewriting for /var/folders/kl/41qb5lp56r1bfzp2z4wqw3pw0000gp/T/tmpp0n5aj4h/art-profile-1.txt
(not sure if this matters)- Many (100+) infos related to one of our dependencies (ThreatMetrix)
Info in /var/folders/kl/41qb5lp56r1bfzp2z4wqw3pw0000gp/T/tmpp0n5aj4h/program.jar:com/lexisnexisrisk/threatmetrix/tmxprofiling/uuyyyuu$uyyyuyu.class: Malformed inner-class attribute: outerTypeInternal: com/lexisnexisrisk/threatmetrix/tmxprofiling/uuyyyuu innerTypeInternal: com/lexisnexisrisk/threatmetrix/tmxprofiling/uuyyyuu$uyyyuyu innerName: uuyyyuu$uyyyuyu
- Many (100+) warnings related to one of our dependencies (Adyen)
Warning in /var/folders/kl/41qb5lp56r1bfzp2z4wqw3pw0000gp/T/tmpp0n5aj4h/program.jar:atd/x/getMessageVersion.class: The companion object Companion could not be found in class atd.x.getMessageVersion
- Many (100+) infos from GMS
Info in /var/folders/kl/41qb5lp56r1bfzp2z4wqw3pw0000gp/T/tmpp0n5aj4h/program.jar:com/google/android/gms/internal/ads/zzbdv$zza$zza$zza.class: Classes with missing EnclosingMethod: com.google.android.gms.internal.ads.zzbdv$zza$zza$zza
[Deleted User] <[Deleted User]> #8
I've run the same task, with the same inputs, on identical hosts, 10 times and here are some of the findings:
Timing distribution
- 24m 26s
- 24m 31s
- 24m 34s
- 24m 52s
- 25m 11s
- 25m 12s
- 46m 56s
- 59m 22s
- 1h 11m 16s
- 1h 14m 43s
(I'm pretty sure I can get even worse timings with more runs)
Develocity
I've looked at the fastest and the slowest and here are the results
- 29290 tasks, 27593 transforms executed in 900 projects in 23m 5s, with 7751 avoided tasks saving 27m 56.697s
- 29290 tasks, 27593 transforms executed in 900 projects in 1h 9m 39s, with 7751 avoided tasks saving 27m 17.650s
Develocity only shows 20 differences in task inputs, and all are related to the final :app
module creation (mergeResources, packageResources, lintVital, etc.). I feel like this is on purpose but correct me if I'm wrong.
Also, the longest tasks are respectively:
-
Fastest build
Task Duration Type :app:minify*WithR8
11m 11.697s com.android.build.gradle.internal.tasks.R8Task
:app:hiltJavaCompile*
54.175s org.gradle.api.tasks.compile.JavaCompile
:app:shrink*Res
35.061s com.android.build.gradle.internal.transforms.ShrinkResourcesNewShrinkerTask
-
Slowest build
Task Duration Type :app:minify*WithR8
49m 0.881s com.android.build.gradle.internal.tasks.R8Task
:app:shrink*Res
7m 19.588s com.android.build.gradle.internal.transforms.ShrinkResourcesNewShrinkerTask
:app:l8DexDesugarLib*
1m 35.673s com.android.build.gradle.internal.tasks.L8DexDesugarLibTask
:app:hiltJavaCompile*
1m 0.498s org.gradle.api.tasks.compile.JavaCompile
CI profiling
I've attached the CPU/RAM profiling of both fast and slow CI builds (ci-fast.png
& ci-slow.png
), and as you can see, even the "fast" build had a slightly higher RAM consumption, so it does not seem to indicate that RAM is the bottleneck here.
R8 Recorded timings
-
Fastest CI build
> Task :app:minifyWithR8 Recorded timings: R8 8.7.18: 655570ms - (27%) Strip unused code: 181784ms - (25%) Enqueuer: 166936ms - (25%) Trace application: 166850ms - (24%) Trace: 161611ms - (24%) Grow the tree.: 161611ms - (16%) Unaccounted: 110536ms - (7%) Find consequent items for -if rules...: 51075ms - (33%) Run center tasks: 218346ms - (28%) Create IR: 189608ms - (17%) IR conversion phase 1: 112822ms - MERGE primary-processor: 578359ms, tasks: 526479, threads: 8, utilization: 64% - (2%) Insert assume instructions: 16280ms - (10%) Inlining: 59286ms - (8%) Unaccounted: 51795ms - (3%) StringBuilderAppendOptimizer: 22318ms - (3%) SparseConditionalConstantPropagation: 22218ms - (2%) RedundantFieldLoadAndStoreElimination: 17224ms - (10%) Remove dead code: 63054ms - (9%) Unaccounted: 57233ms - (2%) Inline classes: 15063ms - (2%) Collect outlines: 12771ms - (2%) Canonicalize constants: 12674ms - (2%) DexConstantOptimizer: 12052ms - (15%) Collect optimization info: 89866ms - (2%) Argument propagation scanner: 11765ms - (3%) Compute class inlining constraint: 19271ms - (2%) Data flow analysis: 15522ms - (3%) Finalize IR: 18764ms - (2%) Finalize LIR code: 14228ms - SLOWEST (0%) void com.google.android.gms.internal.mlkit_vision_barcode.zzkv.<clinit>(): 756ms - (7%) IR conversion phase 2: 47722ms - (5%) Process code: 38038ms - MERGE secondary-processor: 175881ms, tasks: 136562, threads: 8, utilization: 57% - (2%) Lens rewrite: 4924ms - (3%) Insert assume instructions: 6636ms - (2%) Part 1: Compute assumed values: 3685ms - (10%) Inlining: 18879ms - (10%) Unaccounted: 18015ms - (3%) StringBuilderAppendOptimizer: 6582ms - (3%) SparseConditionalConstantPropagation: 6629ms - (2%) ThrowCatchOptimizer: 3645ms - (3%) RedundantFieldLoadAndStoreElimination: 5888ms - (11%) Remove dead code: 20200ms - (10%) Unaccounted: 18392ms - (2%) Collect outlines: 4037ms - (2%) DexConstantOptimizer: 3672ms - (9%) Collect optimization info: 16469ms - (3%) Compute class inlining constraint: 6662ms - (3%) Data flow analysis: 5628ms - (2%) Compute transfers: 3557ms - (3%) Finalize IR: 6473ms - (2%) Finalize LIR code: 4906ms - SLOWEST (0%) com.google.zxing.qrcode.decoder.Version[] com.google.zxing.qrcode.decoder.Version.buildVersions(): 402ms - (24%) Post optimization code stripping: 163671ms - (24%) Trace: 158285ms - (24%) Grow the tree.: 158285ms - (22%) Unaccounted: 150052ms - (7%) Run postlude: 51909ms - (3%) HorizontalClassMerger: 22989ms - (3%) DexApplication.write: 21476ms - MERGE Pre-write phase: 3730ms, tasks: 6, threads: 8, utilization: 2% - (66%) Compute object offset mapping: 2471ms - (17%) Sort strings: 646ms - (9%) Sort types: 372ms - (2%) Sort classes: 106ms - (7%) Sort protos: 285ms - (16%) Sort methods: 628ms - (10%) Sort fields: 394ms - SLOWEST (16%) VirtualFile 3: 627ms - (12%) Compute object offset mapping: 481ms - (2%) Sort strings: 107ms - (2%) Sort types: 106ms - (3%) Sort methods: 116ms - (2%) Sort fields: 79ms - MERGE Write files: 10658ms, tasks: 6, threads: 8, utilization: 6% - (81%) Write bytes: 8663ms - (14%) collect: 1531ms - (66%) generate: 7114ms - SLOWEST (16%) VirtualFile 1: 1753ms - (15%) Write bytes: 1695ms - (2%) collect: 290ms - (13%) generate: 1404ms > Task :app:l8DexDesugarLib Recorded timings: L8 desugaring: 866ms - (5%) Unaccounted: 48ms - (10%) DexApplication.read: 87ms - (52%) IR conversion: 452ms - (28%) CfApplicationWriter.write: 248ms > Task :app:l8DexDesugarLib Recorded timings: R8 8.7.18: 4246ms - (14%) Read app: 605ms - (13%) To direct app: 576ms - (5%) Strip unused code: 212ms - (3%) Enqueuer: 142ms - (3%) Trace application: 142ms - (3%) Trace: 131ms - (3%) Grow the tree.: 131ms - (3%) Unaccounted: 131ms - (59%) Run center tasks: 2510ms - (9%) Unaccounted: 388ms - (49%) Create IR: 2092ms - (33%) IR conversion phase 1: 1410ms - MERGE primary-processor: 2700ms (unknown thread count) - (3%) Inlining: 88ms - (2%) Unaccounted: 78ms - (7%) ArrayConstructionSimplifier: 196ms - (2%) StringBuilderAppendOptimizer: 59ms - (2%) SparseConditionalConstantPropagation: 63ms - (4%) Remove dead code: 123ms - (4%) Unaccounted: 108ms - (7%) Collect optimization info: 205ms - (2%) Finalize IR: 59ms - SLOWEST (8%) int[][] j$.time.chrono.HijrahChronology.hijrahUmalquraMonthLengths(): 216ms - (7%) ArrayConstructionSimplifier: 190ms - (12%) IR conversion phase 2: 518ms - (11%) Process code: 474ms - MERGE secondary-processor: 913ms (unknown thread count) - (2%) Insert assume instructions: 22ms - (3%) Inlining: 30ms - (3%) Unaccounted: 28ms - (2%) StringBuilderAppendOptimizer: 25ms - (2%) SparseConditionalConstantPropagation: 26ms - (6%) Remove dead code: 61ms - (5%) Unaccounted: 53ms - (3%) Canonicalize constants: 30ms - (4%) Collect optimization info: 43ms - (2%) Finalize IR: 23ms - SLOWEST (4%) void j$.time.format.ZoneName.<clinit>(): 40ms - (2%) Canonicalize constants: 21ms - (3%) Run postlude: 146ms - (13%) LIR->IR->DEX: 554ms - (3%) DexApplication.write: 130ms - MERGE Pre-write phase: 31ms (unknown thread count) - (32%) Compute object offset mapping: 10ms - (5%) Sort strings: 1ms - (2%) Sort types: 0ms - (5%) Sort protos: 1ms - (13%) Sort methods: 4ms - (5%) Sort fields: 1ms - SLOWEST (49%) VirtualFile 0: 15ms - (32%) Compute object offset mapping: 10ms - (5%) Sort strings: 1ms - (2%) Sort types: 0ms - (5%) Sort protos: 1ms - (13%) Sort methods: 4ms - (5%) Sort fields: 1ms - MERGE Write files: 165ms (unknown thread count) - (49%) Write bytes: 81ms - (4%) collect: 8ms - (44%) generate: 73ms - SLOWEST (49%) VirtualFile 0: 82ms - (49%) Write bytes: 81ms - (4%) collect: 8ms - (44%) generate: 73ms
-
Slowest CI build
> Task :app:minifyWithR8 Recorded timings: R8 8.7.18: 2924070ms - (25%) Strip unused code: 736640ms - (24%) Enqueuer: 723620ms - (24%) Trace application: 723370ms - (24%) Trace: 717507ms - (24%) Grow the tree.: 717507ms - (12%) Unaccounted: 379824ms - (11%) Find consequent items for -if rules...: 337682ms - (38%) Run center tasks: 1129426ms - (6%) Unaccounted: 176727ms - (30%) Create IR: 899311ms - (2%) Build primary method processor: 60705ms - (16%) IR conversion phase 1: 484578ms - MERGE primary-processor: 2941786ms, tasks: 526479, threads: 8, utilization: 75% - (2%) Insert assume instructions: 87781ms - (11%) Inlining: 345034ms - (10%) Unaccounted: 299517ms - (7%) StringBuilderAppendOptimizer: 225402ms - (3%) SparseConditionalConstantPropagation: 102832ms - (2%) RedundantFieldLoadAndStoreElimination: 76224ms - (11%) Remove dead code: 348008ms - (10%) Unaccounted: 313257ms - (2%) Collect outlines: 68780ms - (2%) DexConstantOptimizer: 67844ms - (16%) Collect optimization info: 483951ms - (2%) Argument propagation scanner: 69957ms - (5%) Compute class inlining constraint: 167361ms - (4%) Data flow analysis: 141715ms - (2%) Compute transfers: 73919ms - (2%) Finalize IR: 81384ms - (2%) Finalize LIR code: 60115ms - SLOWEST (0%) void atd.a.getMessageVersion.<clinit>(): 8757ms - (9%) IR conversion phase 2: 282420ms - (3%) Build post method processor: 103729ms - (2%) Unaccounted: 72493ms - (6%) Process code: 178689ms - MERGE secondary-processor: 1132225ms, tasks: 136562, threads: 8, utilization: 79% - (2%) Lens rewrite: 23347ms - (4%) Insert assume instructions: 46241ms - (2%) Part 1: Compute assumed values: 27603ms - (11%) Inlining: 128824ms - (10%) Unaccounted: 122625ms - (9%) StringBuilderAppendOptimizer: 103096ms - (3%) SparseConditionalConstantPropagation: 41656ms - (3%) RedundantFieldLoadAndStoreElimination: 36435ms - (13%) Remove dead code: 155877ms - (12%) Unaccounted: 141191ms - (2%) Collect outlines: 27247ms - (2%) DexConstantOptimizer: 27025ms - (11%) Collect optimization info: 132392ms - (7%) Compute class inlining constraint: 86322ms - (6%) Data flow analysis: 75670ms - (2%) Unaccounted: 24827ms - (3%) Compute transfers: 37937ms - (2%) Finalize IR: 31502ms - SLOWEST (0%) com.google.zxing.qrcode.decoder.Version[] com.google.zxing.qrcode.decoder.Version.buildVersions(): 2333ms - (18%) Post optimization code stripping: 526494ms - (17%) Trace: 515219ms - (17%) Grow the tree.: 515219ms - (16%) Unaccounted: 486153ms - (10%) Run postlude: 298800ms - (2%) Repackage classes: 74113ms - (2%) Unaccounted: 68181ms - (3%) HorizontalClassMerger: 96201ms - (3%) LIR->IR->DEX: 91028ms - (4%) DexApplication.write: 136273ms - MERGE Pre-write phase: 5479ms, tasks: 6, threads: 8, utilization: 0% - (74%) Compute object offset mapping: 4055ms - (17%) Sort strings: 938ms - (24%) Sort types: 1369ms - (7%) Sort classes: 388ms - (5%) Sort protos: 309ms - (12%) Sort methods: 658ms - (6%) Sort fields: 381ms - SLOWEST (16%) VirtualFile 3: 886ms - (14%) Compute object offset mapping: 798ms - (2%) Sort strings: 158ms - (5%) Sort types: 310ms - (2%) Sort methods: 145ms - MERGE Write files: 181405ms, tasks: 6, threads: 8, utilization: 16% - (81%) Write bytes: 148239ms - (2%) collect: 4620ms - (79%) generate: 143614ms - SLOWEST (17%) VirtualFile 1: 32536ms - (17%) Write bytes: 32410ms - (17%) generate: 31536ms > Task :app:l8DexDesugarLib Recorded timings: L8 desugaring: 2921ms - (5%) DexApplication.read: 160ms - (72%) IR conversion: 2123ms - (16%) CfApplicationWriter.write: 490ms > Task :app:l8DexDesugarLib Recorded timings: R8 8.7.18: 19235ms - (4%) Read app: 804ms - (3%) To direct app: 713ms - (2%) Strip unused code: 558ms - (2%) Enqueuer: 419ms - (2%) Trace application: 418ms - (2%) Trace: 391ms - (2%) Grow the tree.: 391ms - (2%) Unaccounted: 391ms - (70%) Run center tasks: 13622ms - (9%) Unaccounted: 1875ms - (60%) Create IR: 11680ms - (40%) IR conversion phase 1: 7703ms - MERGE primary-processor: 14903ms (unknown thread count) - (3%) Inlining: 497ms - (2%) Unaccounted: 420ms - (4%) ArrayConstructionSimplifier: 733ms - (3%) StringBuilderAppendOptimizer: 526ms - (2%) SparseConditionalConstantPropagation: 432ms - (5%) Remove dead code: 869ms - (5%) Unaccounted: 773ms - (2%) Canonicalize constants: 388ms - (8%) Collect optimization info: 1243ms - (2%) Compute class inlining constraint: 335ms - SLOWEST (5%) int[][] j$.time.chrono.HijrahChronology.hijrahUmalquraMonthLengths(): 862ms - (4%) ArrayConstructionSimplifier: 712ms - (17%) IR conversion phase 2: 3410ms - (17%) Process code: 3291ms - MERGE secondary-processor: 6423ms (unknown thread count) - (2%) Insert assume instructions: 174ms - (3%) Inlining: 216ms - (3%) Unaccounted: 201ms - (3%) StringBuilderAppendOptimizer: 244ms - (2%) SparseConditionalConstantPropagation: 190ms - (7%) Remove dead code: 503ms - (7%) Unaccounted: 450ms - (4%) Canonicalize constants: 272ms - (5%) Collect optimization info: 359ms - (2%) Compute class inlining constraint: 176ms - (2%) Data flow analysis: 139ms - SLOWEST (4%) void j$.time.format.ZoneName.<clinit>(): 289ms - (3%) Canonicalize constants: 214ms - (2%) Run postlude: 460ms - (17%) LIR->IR->DEX: 3274ms
The timing distribution are very similar, but one thing to note (that I don't fully understand) is the presence of LIR->IR->DEX
step in the slow build. Although that might simply be filtering based on percentage.
ra...@google.com <ra...@google.com> #9
I was looking at an issue I reported a while back and this appeared in the list of similar issues and it caught my attention. It is indeed very similar. Here the link:
I think my machine had resources close the minimum required for the build to succeed, but maybe that was not it? It seems that you have a lot of memory and still having issues.
[Deleted User] <[Deleted User]> #10
Here are some feedbacks after enabling Android's Settings execution profile with runInSeparateProcess = true
.
The main minification tasks (minify[variant]WithR8
) now consistently last for about 11 minutes, which proves that there is an issue when R8 runs in the same Gradle process as the rest of the build!
But, we still have from time to time other R8 related tasks (like l8DexDesugarLib[variant]
& shrink[variant]Res
) that takes ~10 times more than what they usually takes.
For example:
l8DexDesugarLib[variant]
: 21s -> 3min 20sshrink[variant]Res
: 36s -> 5m 37s
I'm not sure if these are supposed to be part of the R8 process execution or not, but we still have an issue here!
su...@google.com <su...@google.com> #11
One extra feedback: even with using the runInSeparateProcess = true
it still seems like there are room for improvement.
The CPU appears to be idle most of the time (see screenshot).
Is R8 supposed to be single-threaded, and are there plan to use the full CPU resources of the host?
[Deleted User] <[Deleted User]> #12
Many optimizations in R8 have already been made concurrent. We do have plans to parallelize more components, starting with the most time consuming ones (e.g.,
If you run with -Dcom.android.tools.r8.printtimes=1
you should be able to see the size of the thread pool that R8 has allocated. We recently increased the size of the thread pool and added a new property android.r8.threadPoolSize
that allows setting the thread pool size manually in gradle.properties
(AGP 8.10, I believe).
su...@google.com <su...@google.com> #13
Unfortunately -Dcom.android.tools.r8.printtimes=1
does not seem to log timings for the minify*WithR8
task correctly on the latest stable AGP version (8.8.1).
For example, the Gradle task took 10m 26.855s, but the timings reported are:
- L8 desugaring: 1755ms
- R8 8.8.27: 10669ms
and (unknown thread count)
is always mentioned.
I'll try AGP 8.10, but since it is still in alpha and contains many breaking changes, it is most likely not being promoted to stable until 2026 😬
ra...@google.com <ra...@google.com> #14
The above looks like the time to build desugared library. You probably didn't get -Dcom.android.tools.r8.printtimes=1
passed to the R8 compilation corresponding to your own build. Maybe related to runInSeparateProcess = true
-- or due to the build being cached?
[Deleted User] <[Deleted User]> #15
Indeed, since running R8 in a separate process, the jvm args for our main builds were not entirely replicated (only the xms/xmx). After fixing it, we can see the R8 timings:
R8 8.8.34: 656295ms
And the threading information:
MERGE primary-processor: 592604ms, tasks: 535731, threads: 8, utilization: 58%
MERGE secondary-processor: 189524ms, tasks: 145047, threads: 8, utilization: 55%
MERGE Pre-write phase: 3404ms, tasks: 6, threads: 8, utilization: 1%
MERGE Write files: 12767ms, tasks: 6, threads: 8, utilization: 6%
- do these numbers feel right to you?
- is this thread count limited by
org.gradle.workers.max
of the main build? How could we change that given that we are running on a 16vCPU host.
Side note: using unstable AGP versions is painful for us because some plugin refuses to work on non-whitelisted version. For instance, Firebase Test Lab plugin throws Firebase TestLab plugin is an experimental feature. It requires Android Gradle plugin version between 8.3 and 8.9. Current version is Android Gradle Plugin version 8.10.0-alpha07
.
If we still wanted to test this, what would be the corresponding R8 version?
Description
Version used: 1.0.0-alpha12
Devices/Android versions reproduced on: Pixel 2 Emulator
I have multiple worker chains I run with WorkContinuation.combine(). I noticed that if a single instance of a worker is used in multiple chains, it sometimes runs fine all the way through while respecting dependancies, but sometimes it does not run at all or 'gets stuck' in the middle.
This example is contrived, but illustrates the point. We need each worker to be run once, but when some other worker (or workers) is complete, that does not follow a linear path (more similar to a tree).
Both Workers:
override fun doWork(): Result {
System.out.println("$this::class.java - Started")
Thread.sleep(Random.nextLong(5000))
System.out.println("$this::class.java - Done")
return Result.success()
}
val downloadUsersWorker = OneTimeWorkRequestBuilder<UsersWorker>().build()
val downloadSnapshotsWorker = OneTimeWorkRequestBuilder<SnapshotsWorker>().build()
val path1 = WorkManager.getInstance().beginUniqueWork("one", ExistingWorkPolicy.KEEP, downloadUsersWorker).then(downloadSnapshotsWorker)
val path2 = WorkManager.getInstance().beginUniqueWork("unique", ExistingWorkPolicy.KEEP, downloadSnapshotsWorker).then(downloadUsersWorker)
WorkContinuation.combine(path1, path2).enqueue()
Working Output:
2018-12-11 13:57:53.645 5750-5814/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@c8d5bf4::class.java - Started
2018-12-11 13:57:56.796 5750-5814/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@c8d5bf4::class.java - Done
2018-12-11 13:57:56.822 5750-5819/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@7eef1c0::class.java - Started
2018-12-11 13:58:00.561 5750-5819/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@7eef1c0::class.java - Done
Not working Output (Stuck):
2018-12-11 13:58:27.276 5876-5941/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@a9b9c5::class.java - Started
2018-12-11 13:58:32.137 5876-5941/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@a9b9c5::class.java - Done
Looks like without the unique chain, sometimes the task is created and run more than once. What is expected for these cases?
val path1 = WorkManager.getInstance().beginWith(downloadUsersWorker).then(downloadSnapshotsWorker)
val path2 = WorkManager.getInstance().beginWith(downloadSnapshotsWorker).then(downloadUsersWorker)
WorkContinuation.combine(path1, path2).enqueue()
Output:
2018-12-11 14:09:36.884 6778-6842/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@a9b9c5::class.java - Started
2018-12-11 14:09:37.003 6778-6845/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@ef9e9c7::class.java - Started
2018-12-11 14:09:37.679 6778-6842/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@a9b9c5::class.java - Done
2018-12-11 14:09:40.296 6778-6845/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadUsersWorker@ef9e9c7::class.java - Done
2018-12-11 14:09:40.321 6778-6846/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@8e59ef9::class.java - Started
2018-12-11 14:09:40.563 6778-6846/com.plangrid.android.devgrid I/System.out: com.plangrid.android.workmanager.DownloadSnapshotsWorker@8e59ef9::class.java - Done