Find mutableMapOf<K, V>() allocations inside loops

Proprietary

A mutableMapOf<K, V>() allocated per iteration produces garbage proportional to the loop count. If the map is filled and consumed each pass, consider clear()-and-reuse on a single hoisted map.

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