mapbox/mapbox-base-android

Benchmark and optimize class lookups

LukasPaczos opened this issue · 0 comments

When #14 is closed, we can look into running benchmarks on release builds and measuring the impact of reflection class lookups. https://developer.android.com/jetpack/androidx/releases/benchmark looks like a good tool that we can use.

Optimization ideas, TBD:

  • potentially, kotlinf-reflect is able to cut down invoke calls and class lookup times. We'd need to evaluate binary size increase vs performance improvements if those are confirmed
  • for all other clients that are not building from source but consuming the pre-built binary instead, we could hardcode the glue classes paths and avoid the reflection overhead