Find mutableListOf<T>() allocations inside loops

Proprietary

A 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$KtRecipe
mod 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.