dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.73k stars 3.99k forks source link

Code Cleanup unexpectedly runs the Edit and Continue analyzer #61082

Open vsfeedback opened 2 years ago

vsfeedback commented 2 years ago

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] I tried to capture the issue. Hopefully this dump helps.

My original request is here:

https://developercommunity.visualstudio.com/t/Code-Cleanup-on-Save-delay:-Apply-file/10002097?entry=problem&ref=native&refTime=1649354738211&refUserId=6cc687d3-b6cc-4aee-9d0a-36df14375407&moreInfo=true&viewtype=all

Sorry, I didn't immediately see how submit the recording on the original request.


Original Comments

Feedback Bot on 4/7/2022, 08:04 PM:

(private comment, text removed)

Sam Harwell [MSFT] on 4/26/2022, 11:17 AM:

(private comment, text removed)

jon on 4/26/2022, 11:47 AM:

(private comment, text removed)

Feedback Bot on 4/26/2022, 01:38 PM:

(private comment, text removed)

Feedback Bot on 4/29/2022, 09:54 AM:

(private comment, text removed)

Feedback Bot on 4/29/2022, 09:54 AM:

(private comment, text removed)


Original Solutions

(no solutions)

jmarolf commented 2 years ago

for context from @sharwell

Code Cleanup is running the Edit and Continue analyzer as part of collecting diagnostics to fix on save. This forces the tooling through an extremely expensive Razor path (parsing and compiling all Razor files), leading to long delays when attempting to save a file.

tmat commented 2 years ago

Code Cleanup is running the Edit and Continue analyzer as part of collecting diagnostics to fix on save

If the user has "Apply changes on save" Hot Reload option turned on it would be expected that the EnC analyzer is running.

Eli-Black-Work commented 1 year ago

We're running into this, too. It makes debugging extremely slow, as every time I press F10 or F11 (step over/ step in), it pops up the "Checking for code changes" window for several seconds. Fix incoming? 😛