Use Where before OrderBy

Proprietary

Place .Where() before .OrderBy() to filter elements before sorting. This reduces the number of items that need to be sorted.

OpenRewrite.Recipes.CSharp.CodeQuality.Linq.FindWhereBeforeOrderBy
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Linq.FindWhereBeforeOrderBy

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.