moxy-community / Moxy

Moxy is MVP library for Android with incremental annotation processor and ktx features
MIT License
324 stars 33 forks source link

Make moxyPresenter property delegate inline #138

Open alaershov opened 2 years ago

alaershov commented 2 years ago

Apparently our moxyPresenter property delegate can be optimized:

Property delegation to noinline function(s) causes (reflective) KProperty creation which slows down initialization and should be avoided in applications which should start up fast.

The fix is either to delegate to inline functions (optimized since Kotlin 1.3.60) or to delegate manually.

See these issues in Kotlin YouTrack: