Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher ambient resource use after upgrade to 1.24.1 #5085

Closed
lonix1 opened this issue Mar 3, 2022 · 6 comments
Closed

Higher ambient resource use after upgrade to 1.24.1 #5085

lonix1 opened this issue Mar 3, 2022 · 6 comments

Comments

@lonix1
Copy link

lonix1 commented Mar 3, 2022

Environment data

dotnet --info output: 6.0.102
VS Code version: 1.64.2
C# Extension version: 1.24.1
linux

OmniSharp log

nothing interesting

Steps to reproduce

start vscode

Expected behavior

Load all projects, then keep quiet.

Actual behavior

After upgrading to v1.24.1, vscode loads all projects as usual, and much faster because it seems to be doing it on multiple threads.

But after loading, code/omnisharp doesn't stop working, and the machine's fan never shuts up (it slows down but I hear it). htop shows that code and dotnet ... ms-dotnettools.csharp processes are always doing something, even if I'm not using vscode.

I have no idea how to diagnose this, or whether "it's just me". I do know that it was not light on resources before, but it wasn't heavy either. Now it's quite heavy. htop shows activity all the time. Nothing has changed other than the upgrade to 1.24.1.

Has anyone else experienced this, and do you have any tips to share? If "it's just me" then please close the issue, but maybe if others document their experiences below we can discover if there's a problem?

@lonix1
Copy link
Author

lonix1 commented Mar 7, 2022

cc @JoeRobich Perhaps related, hope it helps in debugging:

I have endless streams of these errors:

Received response for /findusages but could not find request.
Received response for /v2/blockstructure but could not find request.
Received response for /v2/getcodeactions but could not find request.
Received response for /v2/getcodeactions but could not find request.
Received response for /quickinfo but could not find request.
Received response for /v2/getcodeactions but could not find request.
Received response for /completion/resolve but could not find request.
Received response for /v2/getcodeactions but could not find request.
Received response for /v2/getcodeactions but could not find request.

I used to have the same in older versions too, but in this new version the problem got much worse.

Also, hovering / Intellisense, autocompletion/ etc. are VERY slow, sometimes they do nothing. If I observe the log window, I see the above errors.

Sometimes I need to CTRL+. multiple times for the autotcomplete to kick in.

Hope that helps diagnose the problem? Any more info needed please let me know?

@lonix1
Copy link
Author

lonix1 commented Mar 7, 2022

On second thought, I'm not sure the two are related. As I wrote in the original post, vscode + o# consume resources even when I'm working in a different window - if vscode is running, it's doing something heavy. It could be a naughty extension, but I didn't have this issue in the previous version.

@valderrey
Copy link

I have the same problem that you. It's very slow after upgrade. If I disable the extension works fine

@lonix1
Copy link
Author

lonix1 commented Mar 14, 2022

The fix in that PR doesn't help - I just tried the prerelease but unfortunately everything is still slow. And the diagnostic messages are the same "could not find request". Debugging is **very** slow, and folding is slow and showing codelens for tests takes up to a minute.

I'm rolling back two previous versions. It's getting slower and slower on every new release, very frustrating as cannot get work done. No offense to anyone, I think the product is great, but it has some serious problems lately.

EDIT According to filipw's comment in that PR we can't test the prerelease yet.

@filipw
Copy link
Contributor

filipw commented Mar 14, 2022

OmniSharp log

nothing interesting

Please post the log anyway, it would show which variant of OmniSharp you are running (there are three different ones). Have you tried the .NET 6 build of OmniSharp, which is a lot more stable and faster?


The last build of OmniSharp has two changes related to analyzer processing https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options#roslyn-extensions-options

  • default timeout for document analysis was raised from 10 000ms to 30 000ms
  • the amount of threads used is 75% of your cores (instead of a single core only)

These have been found to be drastically improving performance, however it is possible that in certain cases it causes problems. You can restore the old analyzer behavior by setting the following in omnisharp.json file:

{
  "RoslynExtensionsOptions": {
    "documentAnalysisTimeoutMs": 10000,
    "diagnosticWorkersThreadCount": 1
  }
}

The linked wiki page describes where to put thisomnisharp.json file.

@lonix1
Copy link
Author

lonix1 commented Mar 14, 2022

Thanks for all the advice, I read in that PR that I didn't actually try the prerelease with "omnisharp.path":"latest" as it's an "extension level change" as you put it.

So once it's released I'll try again and give feedback. I'm using the previous version until then.

@lonix1 lonix1 closed this as completed May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants