https://kotlinlang.org logo
Title
m

matt tighe

07/28/2020, 9:43 PM
is
this::class.java.simpleName
using reflection?
r

Ruckus

07/28/2020, 10:24 PM
It doesn't use the Kotlin reflection library, but it does use reflection.
m

matt tighe

07/28/2020, 11:00 PM
Is the reflection library in particular where the performance impacts are bad?
r

Ruckus

07/28/2020, 11:31 PM
Performance impact is rarely about which particular features you use. It's all about how you use them.
Reflection can definitely be considered "slow" (relatively speaking), but unless you're doing something crazy in a hot loop, the overall performance impact will likely be negligible.
i

iseki

07/31/2020, 11:02 PM
Try to cache them in a closure? For better performance