stackoverflow.com/questions/435553...
From SO: Because reflection involves types that are dynamically resolved, certain Java virtual machine optimizations can not be performed. Consequently, reflective operations have slower performance than their non-reflective counterparts, and should be avoided in sections of code which are called frequently in performance-sensitive applications.
IMHO, it wouldn't hurt to use lateinit properties judiciously, but relying on them would hurt your performance (eg. looping over a Collection).
Yes, I agree that reflection is slow and overuse of reflection can slow down your application. However, as you said, wise usage of this syntactic sugar won't do much harm.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Reflection has a performance penalty in Java
stackoverflow.com/questions/435553...
From SO: Because reflection involves types that are dynamically resolved, certain Java virtual machine optimizations can not be performed. Consequently, reflective operations have slower performance than their non-reflective counterparts, and should be avoided in sections of code which are called frequently in performance-sensitive applications.
IMHO, it wouldn't hurt to use lateinit properties judiciously, but relying on them would hurt your performance (eg. looping over a Collection).
Yes, I agree that reflection is slow and overuse of reflection can slow down your application. However, as you said, wise usage of this syntactic sugar won't do much harm.