diff --git a/dagger-compiler/main/java/dagger/internal/codegen/compileroption/CompilerOptions.java b/dagger-compiler/main/java/dagger/internal/codegen/compileroption/CompilerOptions.java index b0ab8170697..095915390cc 100644 --- a/dagger-compiler/main/java/dagger/internal/codegen/compileroption/CompilerOptions.java +++ b/dagger-compiler/main/java/dagger/internal/codegen/compileroption/CompilerOptions.java @@ -145,10 +145,22 @@ public int keysPerComponentShard(XTypeElement component) { } /** - * Each switch size is fixed at 100 cases each and put in its own method. This is to limit the - * size of the methods so that we don't reach the "huge" method size limit for Android that will - * prevent it from being AOT compiled in some versions of Android (b/77652521). This generally - * starts to happen around 1500 cases, but we are choosing 100 to be safe. + * Each switch size is fixed at 100 cases each and put in its own method. + * + *

This balances trade-offs between compile-time / bytecode overhead and Android runtime AOT + * compilation: + * + *

*/ // TODO(bcorso): Include a proguard_spec in the Dagger library to prevent inlining these methods? public int casesPerSwitchingProviderSwitch() {