Visual Studio stopped responding

Hi, friends.

I’m quite new here and I am trying to use SonarLint (Version 4.35) as a VS Extension for a large system (Not using SonarQube).

I really need to able my developers to analyze real time their code quality, but just after the installation the Visual Studio reduced it’s performance signicantly and later prompted the following message:

“Visual Studio stopped responding for 8 seconds. Disabling the extension SonarLint for VIsual Studio 2019 might help.”

What can I do to get a good analysis performance in Visual Studio?
If continues to run this way, I’ll be forced to stop.

Hi @daniel.nascimento - welcome to the community.

  1. Is the problem occurring in standalone mode or Connected Mode?

  2. What analysis scope do you have configured in VS? If it is “Entire solution”, does it make a difference if you switch to current document / open documents?

@duncanp , thanks!

  1. Standalone mode;
  2. Entire solution scope, and this is the scope desired. Despite that we deal with a large system, we need to analyse the impacts of changes at one file with the others.

Thanks for helpping, what do you suggest us to do?

I understand that you want to analyse the whole solution, but does it make a difference if you switch the scope to current document / open documents? If so, then that suggests that the delay is probably just due to the amount of time taken to execute the analysis on the entire solution (which is why Microsoft changed the default scope from being full solution analysis).

If the delay is just due to the amount of work being done, then your options are reducing the scope, reducing the set of rules that are run, or changing when the rules are run (e.g. on build rather than live). Some rules are a lot more expensive to run than others - see this thread more detail on how to identify if there are any particularly slow rules.

Having said all of that, I don’t get a gold bar when opening Roslyn.sln (180 projects, >4 million LOC) in VS. Microsoft have done a lot of work in successive VS updates to reduce the impact of analysis on the UX, such as running some of the analysis out of process, so it’s possible there is a different problem.

You can ask VS to write an activity log, which will contain some information about performance issues. If you could send me the log, I’ll have a look to see if that provides any more insights.

1 Like