Vista, Visual Studio and OutOfMemoryExceptions - visual-studio

I'm having a bit of a problem where VS won't build because I get OutOfMemoryExceptions. My Vista box with 2 GIG RAM, is using about 1 Gig of RAM when it starts up, and I am not even doing anything (just connecting to the network drives at work etc)
When I then run Visual Studio devenv.exe peaks at around 730MB after a few builds, and I get the error, mostly needing a restart to rectify.
I have disabled Aero and stopped as many unneccessary services and applications in MSCONFIG. I know there is something about Vista using memory and not being bloated, but using up half my memory after just starting up seems a bit excessive (it is the same on a few dev machines).
What sort of peak memory is your application generating and what can I do to try negate this issue?

730 megs after a few builds is not normal.
Some things to try:
Disable all your VS plugins
Ensure VS is running the latest service pack (are you on 2008 SP1)
Try one project at a time to see which one is hogging the memory

Best way how to solved this, is buying more memory.
I have same problem with XP and 1GB memory and it's nightmare for me. Now I have 3GB and it's OK and I can 2 VS in same time.

Related

Emulate low physical memory in Visual Studio

I am attempting to debug a performance problem that a customer is experiencing by reproducing it in-house. We suspect that the problem is that the customer has a small amount of physical RAM and the program is paging to disk. This is causing very slow reports.
Is there a way to get Visual Studio to emulate this behaviour when I debug? I would like to closely reproduce in house what I have seen at the customer so that I am sure that I am actually fixing the relevant problem.
Using Visual Studio Enterprise 2015 (14.0.24720.00 Update1)
with ReSharper Ultimate 2015.2 (103.0.20150818.200216)
I would suggest creating a Virtual Machine for this, you will then be able to specify exactly the amount of memory/CPU that the machine is to have. The OS will see this as physical limits, so you will be able to tweak it up and down easily without having to build/reinstall any OS (but would need to restart VM most likely).
For this kind of thing I use the free version of VMware Player, which will happily build a VM from install media.
HTH

PC Spec for running Visual Studio 2010 + ReSharper smoothly

Assuming we have to stay on Windows XP x86, what would be the best spec for working in Visual Studio 2010 with ReSharper, PowerTool and a couple of other smaller add-ons?
Components we can upgrade are:
CPU
RAM
HDD
Graphics
At the moment, I have a Pentium Dual-Core E5300 2.6GHz with 4GB RAM and ReSharper makes Visual Studio crash in a solution of around 2000 files.
Really should be moving to Win 7, or at least Win Vista. There is MASSIVE improvements in VS just by running on top of those.
As you stated XP x86, some suggestions:
Ram: 4Gb as fast as you can get. This is important but also only depends on number of VS instances and solution size. At 4Gb I would suggest staying in the low solution bracket (< 25 projects).
CPU: Fast as you can get. Multi core helps a bit, but a lot of the VS UI is single threaded on the GUI.
HDD: VS is a harddrive monster, so fast hard drive. SSD especially here. Spend the money here FIRST. R# perf bottle neck is the file scanning so this will help with this too.
Graphics: Far more important than you would think, mostly due to the fact VS uses WPF and hardware acceleration. Very important to get a good graphics card with STABLE drivers. VS 2010 SP1 disables hardware acceleration on XP by default (can be turned on in the settings) because so many VS 2010 crashes on XP are from unstable graphic drivers and WPF hits those issues a lot. If you get a good stable one, turn that setting on!
Another issue is also just regular restarts, VS does a lot in memory and isn't too good at cleaning up. So the stack fills quickly and it will crash often (PerfWaston is looking for this info) so a restart every so often helps.
As I said at the start your best bet is also one of the cheapest (compared to new hardware) upgrade to Win7, especially x64. More RAM, better SSD support, more stable OS, there is a lot in there that will help your VS experience be faster and more stable.
I would highly recommend moving to 64-bit. Even if you just have 4GB addressable ram with Visual studio, it will have access to more memory if you get more than 4GB of RAM.
Also, get faster hard drives. SSD or RAID 5. I'd pick this over a faster CPU.

Visual Studio 2008 Hangs

Visual Studio 2008 hangs a lot on my machine. I work in an team environment using Team Foundation Server and when the server has issues VS hangs forever, sometimes if I have two instances open one of them will hang even if TFS is working. I try to disconnect from TFS and work offline but even that hangs my VS. Is there any way to make VS more responsive in case TFS is down?
I have a quad core i5 CPU, 8gb ram, and am running locally (not in a VM).
This might help you set VS to work offline and should help with the server timeouts. Also kick the sys admin of your TFS server, it shouldn't be that unreliable.
Sometimes this is caused simply because the TFS dialogs appear off-screen and it appears to hang. If pressing Esc "unfreezes" Visual Studio, then this is likely the problem.
I found the solution at: http://www.imiscommunity.com/visual_studio_2008_hangs_tfs_compare_dialog_not_visible
TFS can be a serious nuisance when developing a solution that is used by many team members. Without knowing more specifics about your setup, I would ask a few more questions:
What is your machine spec?
Are all other developer machines the same spec? Do they experience the same kind of issues?
Have you tried watching the CPU and Memory usage in Windows Task Manager to determine the amount of resources being used?
In summary, I have found that this can often be down to a number of reasons. As a contract developer, I have to use many different systems from the latest desktop with 12GB of RAM and an i7 processor, through to Virtual Machines on a server (my preferred choice because it is scalable and easier to snapshot), down to using older machines that are insufficient for the task (one of the distasteful parts of the jobs is having to request an upgraded machine).
I suggest reinstalling you development environment from scratch, including operating system and everything. Make sure the hardware is the best you can get, and install on a virtual machine instance on that development machine. That way you can take incremental (albeit slightly large at a fair few GB) backups that will prove handy should you come across an issue.
BTW the most common problem I had was with Visual Studio plug-ins on a system that lacked sufficient RAM. ReSharper was my biggest offender as it compiles regularly in the background in order to highlight bugs - but personally I would not code without it now.

Slow Web Project in vs 2008

i have a problem regarding vs 2008, that it is very very very slow, hangs, even if i type "=" building process is not that bad but lagging too much while programing
my system specs are
4gb ram
2.0 c2d
1 gb grahpic card
vista 64
Can somebody tell me solution for this
i have installed visual assist and i have also tried to disable it but the problem still occurs, any solutions ?
I recently had a problem with Visual Studio 2008 being extremely slow (Windows 7 64-bit, 4gb ram, quad core processor), particularly when there were build errors or when loading/saving the solution.
The problem ended up being that the suo file for the solution (in the same directory as the solution) had become corrupted and was 250mb. After deleting it and reloading the solution, the file was 250kb and the project was fast again.
If this is indeed the cause of your problem, I recommend making a backup of the corrupt suo file before deleting it, as I'm sure Microsoft would like to see it (log a bug at Microsoft Connect) - I deleted mine without thinking.
I had the problem when I tried working under Vista as well. It turned out to be traceable to a problem with an out-of-date version of ReSharper. Ultimately I abandoned ReSharper for other reasons (mostly the move to VS 2010). In addition, I also experienced a significant improvement in performance when I moved to Windows 7 (64-bit professional). Just a thought, your results may vary.

How is Visual Studio 2010 performance compared to 2008?

Thinking about installing Visual Studio on my Asus eee 1000HE. Since it is not a very powerful machine, I am wondering if I should install 2008 or the new 2010. Looks like there has been a lot of changes done to the UI, etc. Does that mean that it now runs smoother as well? Or is it actually heavier to run?
Considering that VS2010 is currently only available as a CTP release, I'd install VS2008.
Once VS2010 is fully released, without debug information and with optimizations enabled, ask this question and consider using it. For the moment, if you have 2008, use it. I doubt 2010 will be faster on your 'slow' hardware.
2010 is much slower on older machines in my opinion. I am running it currently on a Dell 700m with 512MB of RAM and while it does run, it feels sluggish and significantly slower than Visual Studio 2008. (Remember that it is a beta though, I am sure that performance tweaks are forthcoming)
It is a little bit more difficult to judge the performance differences since you are running it in a virtual machine at this time (no stand alone beta out yet).
Edit: If I am incorrect on the inability to run it outside of a virtual machine I apologize and stand corrected.
Does that mean that it now runs smoother as well? Or is it actually heavier to run?
This is an old post, I know, but I just had to chime in and laugh: lol
I had a pretty decent overclocked Wolfdale-based machine I built for gaming. Fast enough for virtually everything I need to do on a computer, except for editing text files in Visual Studio 2010. Just scrolling up and down in a C# file maxed out one of my cores. No joke.
So I upgraded to the new Sandy Bridge 32nm CPUs (3.3GHz, unlocked model) in an enthusiast motherboard, with 8GB of Corsair RAM, and scrolling moving the cursor around in a text buffer in VS2010 is using 30% of the CPU (that's right, it's using multiple cores). This is with no plugins and outlining turned off.
Vim in the same file, doing pretty much anything I can think of, shows 0% CPU usage, always.
VS2010's editor performance is absolutely shameful. There's no other word for it.

Resources