Find Canvas { … } blocks inside a @Composable

Proprietary

Canvas { drawXxx(...) } re-runs the draw lambda on every recomposition; allocating Paint, Path, or Brush instances inside the lambda creates GC pressure that shows up as jank. Review for hoistable allocations (remember { Paint().apply { … } }) and for drawWithCache { … } opportunities.

org.openrewrite.kotlin.compose.FindCanvasInComposable$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindCanvasInComposable$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.