BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Addressing Visual Studio 15’s Memory Usage

Addressing Visual Studio 15’s Memory Usage

Bookmarks

As previously mentioned, Microsoft has committed to improving the all-around performance of the Visual Studio “15” IDE.  In this article we will examine the changes they have made to improve VS15’s memory handling in Technical Preview 5 (TP5).  While the main executable remains a 32-bit process, several key components have been migrated into their own process.

Microsoft’s Ashok Kamath has provided greater insight as to just what these changes are.  As a way to measure the changes implemented by the development team, he provides two different metrics:  Peak Virtual Memory (PVM) and Peak Private Working Set (PPWS).  In this context, PVM refers to total amount of memory being used by the main VS15 process.  Since it is 32-bit, it is limited to a total of 4 gigabytes of memory.  For the purposes of this article PPWS refers to the physical memory consumption of the Visual Studio process devenv.exe and related relevant processes.

The first piece of VS15 that has been moved outside the process responsible for the JavaScript language service which provides IntelliSense, code navigation and other features.  The new service is a completely separate Node.js process that works in tandem with VS15, and provides support for JavaScript and TypeScript.  Kamath’s team measured the impact of this new service by loading the WebSpaDurandal solution in VS 2015 Update 3 and VS15 Preview 5.  In Preview 5, PVM usage has been reduced by approximately 33% while there was only a nominal reduction in memory used for the PPWS.

The second area of improved memory usage relates to symbol loading in the debugger.  Throughout Visual Studio’s recent history, work has been done to make C++ debugging faster through highly aggressive pre-fetching off the symbol data from PDB files.  The downside of this approach is that this consumed a great deal of memory.  In VS15, this prefetch functionality has been rewritten so that it focuses on only retrieving needed information rather than its previous “kitchen-sink” approach.  To measure the change, the Unreal Engine solution was opened and the debugger attached to the main Unreal Engine process.  VS 2015 Update 3 could not perform this operation as it would crash with an out-of-memory error.  With TP5, ~3 GB of PVM and ~1.8 GB of PPWS is used.

The third component moved out of process relates to Git.  Previous versions of Visual Studio used libgit2, but with TP5 this is being replaced by git.exe.  Using the Chromium package to measure the difference, the main VS process in TP5 uses 0 GB of PVM (compared to ~300 in VS2015).  The PPWS numbers are roughly comparable.

While metrics provided indicate a reduction in memory usage, developers reacting to this information have raised a couple of issues with the approach Microsoft has taken.  First, it introduces the possibility of degradation due to more memory swapping.  Commenter “Syka” raises the point that moving things out of process can offset memory constraints, but introduces the potential for lower performance as there are higher communication costs with Inter-Process Communication versus the previously used internal calls.  Finally, several commentators observed that the real issue is not memory usage by Visual Studio but rather a lack of available address space since the main process remains 32-bit.  To that end, they repeat the call for a 64-bit version of Visual Studio to be made.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Quite hilarious...

    by Andrea Del Bene,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    In the 2016 they still sell an entire IDE compiled just for 32 bit. And the excuse they gave is really pathetic:

    www.infoq.com/news/2016/01/VS-64-bit

  • Re: Quite hilarious...

    by Jonathan Allen,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I still don't understand the call for a 64-bit IDE. How often are people actually hitting OOM exceptions in Visual Studio?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT