microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
219 stars 9 forks source link

[BUG] Microsoft.VisualStudio.Code.ServiceHost extremely high memory consumption [1.9.8] #1295

Closed MihaPro-CarX closed 1 week ago

MihaPro-CarX commented 1 month ago

Describe the Issue

I'm working with a large Unity project. The solution contains from 129 to 301 projects, depending on the settings. When upgrading to C# Dev Kit 1.9.8 (pre-release), the memory consumption of the Microsoft.VisualStudio.Code.ServiceHost process increased sharply: изображение

In the previous version 1.9.2 (pre-release) there was no such memory consumption: изображение

Steps To Reproduce

1) Open a large project via Unity in VSCode 2) Wait for all projects to be parsed 3) View the memory consumption of the Microsoft.VisualStudio.Code.ServiceHost process in Process Explorer

Expected Behavior

The process does not consume gigabytes of memory.

Environment Information

arkalyanms commented 1 month ago

@AArnott is this different from https://github.com/microsoft/vscode/issues/192043?

AArnott commented 1 month ago

@arkalyanms I don't see any correlation between that issue and this one. @MihaPro-CarX opened this bug at my request over at https://github.com/microsoft/vscode-dotnettools/issues/731#issuecomment-2240394392. I believe the project or language teams should investigate this.

MihaPro-CarX commented 3 weeks ago

Version 1.10.4 still consumes a lot of memory изображение

justonia commented 3 weeks ago

Mem usage on a large Unity C# project: image

It's gotten bad enough that I upgraded to 96gb of RAM to cope.

ookuro19 commented 3 weeks ago

I turned off the automatic updates for the plugins and VSCode, then rolled back the version, and it seems to be working temporarily.

vscode: 1.90.2 C#: v2.33.17 C# Dev Kit: v1.7.25 .NET Install Tool: v2.0.6 img_v3_02dn_0b0c8eaf-06e2-4fe1-b71e-beb23bea0b7g

Before rolling back, it almost used up the entire 32GB of memory.

MihaPro-CarX commented 3 weeks ago

I only have the C# Dev Kit extension rolled back to 1.9.2, the rest of the extensions are the latest versions. Then there is no such memory consumption and I can work normally.

MihaPro-CarX commented 3 weeks ago

C# Dev Kit version 1.10.6 does not have such memory consumption! It seems the problem has been resolved.