Find graphics allocations inside View.onDraw
ProprietaryAndroid views call onDraw on every frame. Allocating Paint, Path, Rect, RectF, Region, Matrix, or Bitmap instances per draw causes GC pressure and dropped frames — hoist them into field initializers or lazy { } properties.
org. openrewrite. kotlin. performance. FindAllocationsInOnDraw$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. FindAllocationsInOnDraw$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.