R8 Optimization: Method Outlining
[]
Jake Wharton
I recently wrote about the economics of generated code which talked about performing optimizations to generated code that aren't worthwhile in manually-written code. data class User ( val id : String , val username : String , val displayName : String , val email : String , val created : OffsetDateTime , val isPublic : Boolean ) data class Tweet ( val id : String , val userId : String , val content : String , val created : OffsetDateTime ) By electing to duplicate the StringBuilder code, only 20 properties are needed in any number of JSON model objects before R8 outlining kicks in.