roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Add Delay in Real Time Compilation in Visual Studio.

Open kendrahavens opened this issue 6 years ago • 5 comments

Original developer community item

I am working on an Open Source Project based on C# using Visual Studio 2017. Whenever I make any changes in it, Visual Studio (in a delay of about half a second) starts checking the code for errors in it which is why sometimes it gets hanged. I want to know if there is any option to increase this delay. If the delay would have been of about 3 - 5 seconds, I could make changes without any error list generated. I don't want to disable this awesome feature, but it is irritating if you don't have a great typing speed. Any solution?

kendrahavens avatar Jul 22 '19 18:07 kendrahavens

Related to https://github.com/dotnet/roslyn/issues/19347

kendrahavens avatar Jul 22 '19 18:07 kendrahavens

This user also mentions a experiencing a hang, so I've asked for a trace in the devcomm feedback.

kendrahavens avatar Jul 25 '19 00:07 kendrahavens

To add to this - it'd be nice to have an option to only trigger real-time compilation when a file is saved.

The rationale being that if I'm actively editing a file, I know that it's not in a valid state. That when I'm ready to commit to saving, I've decided it should be in a valid state now.

jgscherber avatar Jun 18 '20 19:06 jgscherber

Second the comments above. This should be configurable, and the suggestion from @jgscherber to allow recompilation only on save is excellent. This is not just about avoiding a hang/crash, but a serious usability problem. Having the IDE marking/unmarking errors, adding/removing items from the "Errors List" window and so on while typing fast is incredibly distracting.

abdekker avatar Feb 22 '21 18:02 abdekker

Please could you add an option to delay syntax checking until the cursor leaves the current line?

Squiggles constantly appear while typing, and if I type something with a string literal, like s = "Total: ", the rest of my code goes red until I close the quotes! It's very distracting.

Thanks.

MarvusMedia avatar Sep 22 '22 14:09 MarvusMedia

Need info on the purported hang that is happening.

CyrusNajmabadi avatar Feb 14 '23 00:02 CyrusNajmabadi

May I respectfully suggest that delaying syntax checking until the cursor leaves the line being edited will make the hanging problems moot? The two disparate issues on this page will be simultaneously resolved by delaying the syntax check. Thank you.

MarvusMedia avatar Feb 14 '23 00:02 MarvusMedia

Closing this issue as we've seen no reply to the request for more information. If you are able to get the requested information, please add it to the issue and we will retriage it.

ghost avatar Feb 24 '23 02:02 ghost