Use none { predicate } instead of filter { predicate }.none()
Proprietarynone { predicate } short-circuits on the first match. Calling none() after filter first materializes the entire filtered list.
org. openrewrite. kotlin. performance. UseNoneWithPredicateInsteadOfFilterNone$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. UseNoneWithPredicateInsteadOfFilterNone$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.