mapbox / mapbox/mapbox-base-android

Benchmark and optimize class lookups

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
12
Forks
6
PR merge metrics
No merged PRs in 30d

Description

When https://github.com/mapbox/mapbox-base-android/issues/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the prerequisite issue #14 and the AndroidX Benchmark documentation. Benchmark release builds to measure reflection class lookup performance, then evaluate the binary-size and performance tradeoffs of kotlin-reflect and hardcoded glue-class paths. Done means the alternatives have measured results and a documented optimization direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.