Find LINQ Count() on materialized collection
ProprietaryDetect LINQ Count() or Any() on types that have a Count or Length property. Use the property directly for O(1) performance.
OpenRewrite. Recipes. CSharp. CodeQuality. Performance. FindOptimizeEnumerableCountVsAnymod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Performance. FindOptimizeEnumerableCountVsAnyInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.