-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
VS 2015 memory usage and perf after some hours of use #7082
Comments
I also have to restart VS from time to time in order to get it fast again. I have Resharper installed, though, they're a known source for sluggishness. So I'm not sure whether it actually is Microsoft's fault. Do you use Resharper as well? All in all, VS2012 was the fastest VS I've ever used for C# development. VS2015 is almost as bad as the horrible VS2010 performance-wise. I do realize that Roslyn was a huge change for VS and that it initially might sacrifice some performance now to get VS ready for the future (like the switch to WPF was with VS2010). But I really hope that VSnext will focus on performance again like they did with VS2012... |
@axel-habermaier No, i don't use Resharper. I use coderush for roslyn on one machine, however the issue remains when uninstalling coderush, so it's not related to it. |
Do you use a CodeLens? I have the same problems with it in the big (60-70 projects) solution. |
I already disabled CodeLens. Performance with CodeLens enabled is worse though. |
As @axel-habermaier says, Visual Studio require more memory at last versions. But I have no problems with it when I work with small projects. VS may use up to 1 GB of memory, but it acceptable price for convenience: I use a lot of features (like WPF designer or CodeLenses) and extensions (like ReSharper) which use a lot of memory. But when I twice rebuild Roslyn solution, VS consumes up to 2 GB of memory, that is a limit for 32-bit process. So, it may periodically freeze until I force gc (Ctrl+F12 twice). Memory profiling + move to 64-bit processes as soon as possible would be the best solution. Building VS with /LARGEADDRESSAWARE may be temporary solution. |
@davkean Can you take a look at this, particularly the possible issue around undocking code windows. |
There is definitely something wrong when working with undocked code windows or with multiple windows in a horizontal/vertical split view. (Update1 installed) VS becomes slower and slower, and memory usage increases. I took these 2 screenshots, while VS was just opened (with no code windows, samples taken within a 1 minute range ). |
@davidroth I cannot repro this - I'm constantly using three screens of undocked windows, so it doesn't appear to be a general issue, it might be related to what tools windows or projects you have opened. Does this occur with all projects? Does it occur when projects are closed? Can you Send A Frown (Report a Problem) if you are using Update 1 and include "davkean" in the description of the issue, make sure you do this from another instance of VS and click Start Recording when it's at its worse: |
@davkean I have sent you a feedback with the recording. Although I just recorded once i noticed that memory started to increase up to 2.2 GB while doing nothing. Is this enough? To answer your other questions:
|
Here is a screenshot from some basic memory monitoring with dotMemory: As you can see, there are three major collections/allocation phases within 20s timeframe. Memory ranges between 1.4 - 1.9 GB in this sample. (Solution opened, no windows opened, not working with VS) In the above screenshot you can see the top allocated managed objects. I took this after about an hour of work. However this time I did not undock any windows. So my previous assertion about this being an undocking issue may be invalid. However working with multiple windows certainly does accelerate the issue I am describing here. |
We have exactly the same problem. Even after closing a project, VS CPU usage will continue to be high and memory usage often climbs to 2GB. It's bad enough that this happens while working on a solution when it's open but unexplainable that it happens after closing it. |
To further build the case for some investigation into this issue, I would add that we have the same issue in our dev team. Memory consumption increases to over 2.5Gb causing visual studio to become unresponsive to the point where the only option is to restart. |
We are having the same issue with our Dev team. Our solution is very big. It has 46 projects. I've also installed Update 2 RC and it still has not fixed the issue. We are using Resharper and CodeLens. When first opening the solution it is about 1Gb and then memory increases and after 4 hours or so it goes over 2GB and then Visual Studio becomes unresponsive. |
Out of curiosity, how many of those reporting problems on this thread are using resharper? |
I'm not running ReSharper or any other similar extension and there are a couple others on our team with the same issue. We also have people with ReSharper installed who experience the same issue. |
Thanks @jedidja, good to narrow things down. For everyone on this thread that has this happen to them, it would be greatly appreciated if you clicked Send A Frown (Report a Problem) as per @davkean 's instructions |
@jmarolf Ok, submitted. We have about 20 projects in our solution and are running Community Edition. We've tried 2015 Update 2 RC and still see the same problem. I'd be happy to do a screen-sharing session with anyone on the team if that would help. |
Also, the 30-35% CPU usage happens regardless of machine. It's the same on both my desktop (i5-3570K 3.4Ghz) and also on my 2015 Macbook Pro (i7 2.5 Ghz) under Parallels. |
@jmarolf I had this issue both in clear Visual Studio and with ReSharper |
I have updated to VS2015 Update 2 today, and now I am getting this new message bar when the memory consumption is over about 1.5 GB: However, my overall system memory consumption looks like this: @davkean Have you been able to reproduce this issue in your labs or do you need additional reports? |
+@heejaechang do you know what's going on here? Are we fragmented? |
Update 2 has make VS just about unusable for our large project: Description: The application requested process termination through System.Environment.FailFast(string message). |
@AdjutantML Hi. we have 3 memory leak fixes waiting for next micro-update. both of them seem related to your scenario. I believe those micro-update will be released soon. if that still doesn't improve your scenario, can you provide us dump through "send a frown" menu? |
@heejaechang Nice to see further Perf improvements are in progress! I believe this could be fixed with 53f1ae6? |
@davidroth Hi David. sound like this issue - #10358 no fix yet, but we are aware of the issue @Pilchie @jasonmalinowski |
Thanks @heejaechang, looking forward to it. @nicholashead noted. |
@heejaechang thanks, yes #10358 looks exactly like the issue I described. |
@davidroth @jasonmalinowski is expert on project system. he is probably better person to answer that. |
@davidroth Can't say just because I literally haven't had the time to look at it. Let's discuss #10358 on that issue, rather than polluting this discussion further. |
@Pilchie: could you track this? |
Good work guys, On the topic of rename / refactor : Is it possible to persist the keyboard cursor position when starting a rename / refactor action? This is what happens:
When renaming by retyping the entire name (or typing a new name), it is possible to simply start typing (which is nice), but about 80% (or more) of the time I find that rename / refactor operations consist of only a few letters. Is there a way to restore or enable such functionality (persist the cursor location - i.e. do not move the cursor to beginning or end of element)? |
@AdjutantML, you don't need to invoke the refactor rename first. You can just do some changes and press |
@DickvdBrink, that is perfect! |
At this point, I think the issues that triggered this thread seem to be mostly addressed, or already tracked in other issues. I'm going to close this issue, but please continue to file new issues for specific problems that you're seeing - improving performance and memory issues is one of our top focuses for 2.0/VS "15". |
I have installed VS2015 14.0.25425.01 Updated 3 but still having problems with memory. When I start VS at the evening with full available memory and leave VS open during the night, come back in the morning and there is almost no memory left (2GB of 32GB). If I look in the process explorer I can see not application that keeps the memory, also Resharper is turned off. |
@msedi Would you mind expanding on "left open".
|
@msedi Can we please move this to a new issue. You appear to be talking about something other than the actual VM used by the devenv.exe process, which is limited to 4GB being a 32-bit process. |
@Pilchie: You may be right and I'm not quite sure who is using the memory. It seems that VS isn't using the memory, also when using the ProcessExplorer there is nothing that tells me who is using the memory. Where VS is still used as a 32bit-Process I'm aware that the process "devenv" is obviously not using it. Of course I can open up another issue, but I thought it fits here. BTW: The 32GB was related to the memory in my computer and someone is eating the memory, but I cannot find out who ;-) |
@AdamSpeight2008: Sorry for being to vague. VS is left open with all projects loaded. In other words, I work with VS, compile things, leave the solution open, and when I stop working and go home, I leave VS in it's current state - simply don't touching anything anymore. |
@msedi If you launch Task Manager (Ctrl + Shift + Esc) and sort by memory usage what do you see? |
@jmarolf I have installed Windows 7/x64. Attached are two screenshots of my running processes |
This does not appear to be happening in your screen shots. Please file a new bug if you find out that devenv.exe is taking up all of your system memory. |
Just an observation: Why is this issue closed? I am seeing this issue on Build: Installed Version: Community Visual Basic 2015 00322-20000-00000-AA351 Visual C# 2015 00322-20000-00000-AA351 Visual C++ 2015 00322-20000-00000-AA351 Visual F# 2015 00322-20000-00000-AA351 Application Insights Tools for Visual Studio Package 1.0 ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11106.0 ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 ASP.NET Web Frameworks and Tools 2013 5.2.30624.0 AWS Toolkit for Visual Studio 2015 1.10.0.6 This software includes third party software subject to the following copyrights:
Common Azure Tools 1.5 CreateLayoutWizard 1.0 Devart Code Compare 4.1.78 DevExpress.DeploymentTool 1.0 Entity Framework Power Tools 1.0 When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:
GitHub.VisualStudio 2.3.6.391 JetBrains ReSharper Ultimate 2016.3 Build 107.0.20161214.141528 Microsoft Azure Mobile Services Tools 1.4 NuGet Package Manager 3.3.0 PreEmptive Analytics Visualizer 1.2 SQL Server Data Tools 14.0.50616.0 XtraReports package 1.0 -=-=- Should I open a new issue? |
@timeichfeld-msa yes, but I would also suggest maybe you give the newest VS a try? |
Understood, I will try that. Thanks! |
@timeichfeld-msa when this happen again, can you create a full dump and provide the dump to us? that will help us to figure out what is consuming so much memory. |
Hi guys,
I am currently working on a relatively decent solution and I am having problems with high memory usage of VS2015 after some time of usage.
I usually have to restart VS some times a day, because memory usage goes up to > 2 GB and the IDE becomes sluggish.
When opening the solution and building it the first time, VS usually consumes about 750MB.
After some hours I usually have > 1.8 GB and the IDE gets slower and slower.
I have also noticed, that when using VS on multiple desktops (ex. undocking a code window on the 2nd screen), memory consumption increases even faster and the IDE becomes laggy in a relative short amount of time.
Are there any known issues regarding increasing memory consumption of VS2015? Or if not, whats the best way to debug this and provide you with some information to improve this? I could use a memory profiler and check which objects are alive if this is helpful for you?
Edit: I am not using resharper. I am using coderush for roslyn on one machine, however the issue remains when uninstalling coderush, so it's not related to it.
The text was updated successfully, but these errors were encountered: