- Operating system: Windows 10
- IDE name and flavor/env: Rider 2021.3.4
- SonarLint plugin version:220.127.116.11106
- Is connected mode used: no
We have a large solution containing around 95 projects. After I upgraded to the latest version of Rider with the latest version of SonarLint my memory consumption increased to 99%…
OmniSharp used 16GB of memory in that case.
After disabling SonarLint the problem did not occure again, but I would like to have SonarLint enabled for obvious reasons.
Thanks for reporting the issue. It is expected that OmniSharp consumes some memory, but 16Gb looks really bad.
We would like to know if this is purely an OmniSharp issue or if this is coming from the addition of our analyzer.
May I ask you to open your solution in VSCode with the VSCode C# extension, open a few files to ensure eveything is loaded, then check how much memory OmniSharp is using?
I opened the same solution in VSCode. After waiting a while and opening different large files, this was the result.
We will investigate on our side, and come back to you when we know more.
We have the same problem here, omnisharp with sonarlint using between 4 and 8 Gigs of RAM:
There’s also an OmniSharp issue open, without any real findings for now:
Is there anything we can do to assist? Maybe memory profiling OmniSharp.exe or similar?
Do you know if there is a reason for you to have 3 Omnisharp processes? Do you open multiple solutions at the same time?
Do you see the same memory consumption issue when opening your project in VSCode?
By that time, I had 3 Rider instances open, each on a different solution, this explains the three OmniSharp processes.
I’m not using VSCode for C# programming, what do I need to do to correctly load a solution (.sln file) there?
Simply open VSCode with the C# plugin installed and open the folder that contains your solution and it should be enough. You can also manually select the .sln you want to load. Wait for language features to appear (intellisense, diagnostics) so ensure OmniSharp is done loading your solution, and then you can check for the memory consumption.