Find mutableListOf<T>() allocations inside loops
ProprietaryA mutableListOf<T>() allocated per iteration produces garbage proportional to the loop count. If the list is filled and consumed each pass, consider clear()-and-reuse on a single hoisted list.
org. openrewrite. kotlin. performance. FindMutableListOfInLoops$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. FindMutableListOfInLoops$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.