Find Android-specific performance smells

Proprietary

Patterns that drop UI-thread frames or allocate at draw time: findViewById inside onDraw/onMeasure/onLayout, unbounded BitmapFactory.decode* (no inSampleSize), hand-rolled Thread.start() from UI components, Handler.postDelayed (no lifecycle), and pre-coroutine runOnUiThread / View.post dispatch.

org.openrewrite.kotlin.android.FindAndroidPerformanceSmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.android.FindAndroidPerformanceSmells$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find findViewById inside onDraw / onMeasure / onLayout
  2. Find BitmapFactory.decode* calls
  3. Find Thread { }.start() calls inside Activity / Fragment
  4. Find Handler.postDelayed(...) calls
  5. Find Activity.runOnUiThread { } / View.post { } calls