Hi, we’re working on our upgrade from Kotlin 1.4.3...
# android
b
Hi, we’re working on our upgrade from Kotlin 1.4.32 to 1.5.21. We’re seeing a large regression in both app size and startup performance, which seems to be due to R8 now poorly handling lambda classes (eg, merging seems to not be working). Anyone else face this or have ideas how to resolve?
e
haven't noticed issues here, but I think we don't have very many SAM lambdas (which are the only ones using InDy by default now). the docs say you can use the compiler option
-Xsam-conversions=class
to go back to the previous behavior, or
-Xlambdas=indy
to apply the new behavior to non-SAM lambdas as well (experimental, not default) https://kotlinlang.org/docs/whatsnew15.html#sam-adapters-via-invokedynamic
b
that’s a good call-out! I’ll give that a try, thanks
Running an extra test to confirm, but the results are pretty interesting! I still see a large regression in app size (+380kb, down from +490kb), BUT, the startup performance IMPROVES significantly (-6.5%, instead of +6.5%!)