-
Notifications
You must be signed in to change notification settings - Fork 16
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
Microsoft.CodeAnalysis.LanguageServer is taking 10gb of ram #1201
Comments
Hi @hrodrick, That seems a bit excessive indeed. Which version of Unity are you using? ![]() Are you generating project files for all your packages? Does this happen if you only generate project files for your in game code, and not for Unity packages? Thanks! |
Interesting, I had literally everything checked on. Now, I was playing a bit more and it seems to be a memory leak somewhere. Look at this video (code at left, ram at right): VSCode.-.bug.issue.mp4I started to write and remove (with ctrl+z) that "GameEvents" line over and over. And the ram usage didn't stop to increase. Sounds silly but I believe it is actually an issue, because it increased 1.7gb of ram usage by just doing that. (from 3 to 4.7, I realize to record late). And it doesnt go down until I restart VSCode |
Sorry I forgot to answer the other questions. |
Unity's model of having all packages as source means that if you check those, Unity will generate a csproj for each package (and asmdef in those packages). So you end up potentially with 50+ projects, that Roslyn will need to analyze so that you can do code navigation, find references and refactorings across them. I'll share your video with the C# extension folks. By any chance, would it be possible to share your project privately so that we could investigate exactly what you're looking at? If not, could you share the list of Unity packages you're using? |
Hi! Sadly I can not share the project. But here is the list of unity packages:
|
@hrodrick thanks! I can repro the memory just growing. I'll pass that along to the C# team. |
I have a large Unity project with 301 projects in Solution. |
We would need a heap dump of the process(es) consuming excess memory in order to start investigating this issue. I'm not sure how a VS Code user would be expected to complete this, since the "Report Issue" feature of VS Code posts issues publicly. |
Had the same issue. It doesn't help if I switch to the pre-release version for c# Dev Kit v1.11.x. |
My problem is related to ServiceHost and fixed in C# Dev Kit 1.9.2 and later. |
Closing based on recent comments. Please reopen if this is still an issue with a dump and send it to arkalyan@microsoft.com. I will route it. |
Type: Bug
I am working on a unity project. Everything was fine. But suddenly the process "Microsoft.CodeAnalysis.LanguageServer" is taking almost all the ram in my computer. Right now 9764.7 MB are being consumed by it. Becoming almost unusable
I see this information in Windows's Task Manager.
As a note, I am not debugging nor doing anything special. This happens right when I open Visual Studio Code. And in the Output I only see a lot of messages of different projecs loaded by C# Dev Kit. It was always like that but it never consumed that amount of memory before.
Extension version: 1.7.25
VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:01:24.262Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: