Find collection construction inside loops
ProprietaryFlags listOf / mutableListOf / mutableMapOf calls that allocate a fresh collection on every loop iteration. Hoist constants or clear()-and-reuse a single instance.
org. openrewrite. kotlin. performance. FindLoopAllocations$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. FindLoopAllocations$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.