Use firstNotNullOf { f } instead of mapNotNull { f }.first()
ProprietaryfirstNotNullOf short-circuits on the first non-null result. mapNotNull { f }.first() walks the whole input.
org. openrewrite. kotlin. performance. UseFirstNotNullOfForMapFirst$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. UseFirstNotNullOfForMapFirst$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.