dotnet / project-system

The .NET Project System for Visual Studio
MIT License
959 stars 385 forks source link

Avoid per-call lambda allocation #9452

Closed drewnoakes closed 2 months ago

drewnoakes commented 2 months ago

This change passes the captured state on the stack, to avoid a heap-allocated closure object. The delegate will then be cached and reused.

Microsoft Reviewers: Open in CodeFlow