Hi, I recently started noticing that when I have CodeRush enabled, the ServiceHub.RoslynCodeAnalysisService.exe is using a lot of memory and is constantly using CPU causing the fan of my laptop to be quite loud.
Currently it's constantly using 5-10% cpu and is using almost 14GB of memory (while typing this message it went from below 13.5GB to 14.3GB when I'm not even doing anything). When I first open the solution at work, which is quite big at around 250 projects, the memory usage is around 5-6GB. But when I start working then it just keeps increasing and is never going down. Also opening VS suggestions is taking a lot of time.
When I disabled the CodeRush extension, the memory usage is around 3GB with the same solution and is not increasing constantly and suggestions are also much faster.
I tried to gather a log with the performance monitor, but when I stop collecting the logs then a log file is never written to or displayed.
How can we find out what is causing this memory usage?
Peter,
Do you have code issues registered in Visual Studio by any chance? If yes, disable them and see if this improves your situation:
If this doesn't help, please send us your CodeRush settings and logs for investigation. We will look for potential culprits of the slowdowns:
I look forward to hearing from you.
Hi Przemyslaw,
I didn't have any code issues registered in Visual Studio. I have attached the logs files from the CodeRush logs folder. I hope you can find out what is causing these issues.
Thank you for the log files. Please also attach your settings, as requested in my last comment.
Sorry I forgot them, here are the settings.
Thank you for sharing your settings. We need some time to analyze the files.
Peter,
I analyzed your logs and settings. I did not find any exceptions related to the code analysis in your logs. Looking at the enabled features, I found that only the spell checker can affect the code analysis process. Please disable the CodeRush Spell Checker and see if it makes any difference to you. If you find out that it is the culprit indeed, and you don't want to disable it entirely, you can play with its settings to lower its analysis scope and thus making it more performant.
Let me know if this helps.
Hi Przemyslaw,
I played around with the CodeRush spell checker settings, and it does seem that the spell checker is causing this.
When I have it enabled and I start VS and open my solution it does some loading. If I wait for the loading to finish (by checking the CPU usage to go down to 0) if I then just switch to different tabs I already had open then I see the CPU/Memory of the RoslynCodeAnalysisService to go up and never going down.
If I disable the spell checker and do the same the CPU/Memory doesn't increase if I switch tabs. Let me know if you want to further investigate this.
Peter,
Could you enable the spell checker, but disable all its additional options as in the following picture:

Are you experiencing the symptoms now? If not, please enable these options one by one and see which one causes the issue to reappear.
I look forward to hearing from you.
Hi Przemyslaw,
I enabled the spell checker and disabled all options as you indicated, but still I get the same behaviour. I also updated to the latest CR version (24.1.5) but still the same behaviour is showing.
Peter,
We will look into the Spell Checker code to verify its behavior. I will update this thread once we have any news.
Peter,
We made some changes in our spell checker. Please install this developer build and let me know if you still encounter this issue.
Hi Przemyslaw, I installed the developer build and it works much better now. When I have a lot of tabs open and switch between them the memory and cpu usage is quite normal. It's not using a lot of memory any more. So it seems the issue is fixed.
Peter,
Thank you very much for your testing and confirmation. I will close this issue as fixed.
Do you mind if we make this ticket public so that we can include it in the list of fixed issues for the next release?
Sure no problem, you can make this ticket public.
Thank you!