There is the new inspection for combining multiple...
# eap
k
There is the new inspection for combining multiple collection operations. In one case, it offers to combine
map
and
joinToString
which looks harmless but actually the lambda in
map
is inline while in
joinToString
it's not. Is this an issue? I understand that the extra lambda allocation is probably compensated by the saved
List
allocation but the code size and method count grows a little.
m
Good point. I'd say this inspection makes code faster, and almost always it's more important that tiny code growth. But in general case, you're right. Do you think we should not offer this change for
map
+
joinToString
combination?
k
Maybe add a note to the quickfix text "(Lambda will not be inlined anymore)"