dotnet / linker

389 stars 126 forks source link

Move semantic model in DAM Code Fix #2986

Closed iserrato closed 2 years ago

iserrato commented 2 years ago

Not for this PR, but for future follow-up work: The Roslyn IDE team recommends to not get the semantic model in the RegisterCodeFixesAsync method, but instead to fetch it in the code-fix itself. Calling it here slows down the whole lightbulb menu creation for any diagnostic code that would trigger the code-fix.

_Originally posted by @jkoritzinsky in https://github.com/dotnet/linker/pull/2939#discussion_r946054636_