Why is Visual Studio using so much memory?

Probably not directly related to UE4 - but I find I have to keep killing “Package Server” processes and / or restarting visual studio because it’s eating up all my RAM and eventually causing system instability.

Anyone know how to solve this? It’s Visual Studio 2013 Ultimate, I have 16GB of RAM and usually UE4 editor and VS open. I’ve tried with and without Visual Assist plugin enabled.

A few things:
Make sure you have the latest update, should be CTP 4 if I remember right, there’s lots of performance improvements especially with large code bases like UE4.
In my experience the high memory usage is due to Intellisense parsing the code. I’ve somewhat mitigated it by disabling Intellisense and installing Visual Assist, which I’ve found to be more robust and responsive anyway. I note you mention you’ve tested with and without VAX but are you disabling Intellisense when you turn VAX on?

Thanks that was the problem exactly! I didn’t realize you had to disable Intellisense when VAX was installed.

VAX is really worth every penny, from my experience Intellisense is all but unusable with UE4.

Well, you don’t have to disable it, VAX can use information from it and extend it if you leave it on.

The intention behind Update 4 for VS was performance improvements with large code bases like UE4 - you can look at a post in the C++ section on the forums for more information. It definitely helps if you’re on a machine that can’t install VAX, or for people unable to justify the expense of it.

I have the same issue with multiple instances of the Visual C++ Package Server, each taking up around half a gig of memory. The number of instances starts out at one and just grows with the length of my programming session. I haven’t had this issue with other projects done in Visual Studio (I’m using the latest community edition, I don’t have Visual Assist and Intellisense is enabled) so my suspicion is it may be a problem with the unreal build system.

Can anyone confirm if they also have this issue? Is it a bug, or expected?

To quote:

"This is actually a problem with your intellisense settings. If you close those processes they just reopen.

Go to “Tools->Options->Text Editor->C/C+±>Auto Tune Max Cached Translation Units” Set it to false

Now under the same place set “Max Cached Translation Units” to 2 since that’s the lowest possible value.

That will limit VS to only launching 2 of those processes at a time instead of like 7 of them or something. Your horrible performance issues should now go away since all your RAM will stop being eaten up by intellisense.
"

1 Like

Also - if you are finding that your devenv.exe memory use balloons during symbol load (mine just hit nearly 4GB, typical is around 1GB while debugging), try deleting your breakpoints. Sometimes they seem to get corrupt. This has probably happened twice to me in the last five years but each time I wasted a load of time figuring out the problem.

1 Like