Find Class.forName calls inside loops

Proprietary

Class.forName(...) walks the classloader hierarchy on every call. Resolving the same class on every loop iteration burns CPU — cache the resolved Class<*> in a top-level property.

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