简体   繁体   中英

Visual Studio on Windows 10 VM - poor performance

I'm using a MacBook Pro Retina, Mid 2012 with 16gb ram. I'm running up a VMWare Fusion guest VM with Windows 10 on it.

Up until now I've been using SQL Server on it and so far performance has always been extremely fast/responsive - no issues at all.

I'm now needing to do full stack development using Visual Studio for .NET Web Applications, so have installed VS 2017 and IIS. I have now given the vm 8gb ram and 2 cores.

Unfortunately Visual Studio (and the compiled APP on IIS) seems VERY sluggish - and compiling is extremely slow. It's much slower than I would expect. The .NET application is fairly large (4gb) - most developers working on it use a dedicated Windows DELL machine with 16gb. Even accessing the web application through a browser within the VM is extremely slow too. The whole VM has become much more sluggish.

Just wondering if anyone might have tips or experience with Visual Studio .NET in a Windows VM like this? Is the performance lacking? Is there anything I should be doing or should this be expected? Should I switch to bootcamp?

Any help or advice would be much appreciated.

Details:

MacBook Pro (Retina, Mid 2012) 16gb ram 
OSX El Capitan 10.11.2 
Windows 10 
VMWare Fusion 7.1.3  
SQL Server Visual Studio 2017   
Processor Name:   
Intel Core i7 Processor Speed: 2.3 GHz 
Number of Processors:    1
Total Number of Cores:    4 
L2 Cache (per Core):    256 KB 
L3 Cache:  6 MB 
Memory:    16 GB 
Boot ROM Version:MBP101.00EE.B0A 
SMC Version (system):    2.3f36

Compiling solutions in VS is primarily a disk-intensive task so even if you give it all RAM and CPU cores, the disk will usually be the first limiting factor you'll hit, especially so when using virtual machines. Additionally, startup of non-precompiled web applications is slow as well, as a lot of markup (like cshtml) is compiled on the first access.

Also, the "classic" c# project system does a lot of blocking calls to the build system on the UI thread which slows down VS. This gets worse when the complexity of your project structure increases (number of projects, references) and custom build tools that may run during those calls.

When using a lot of .net core / .net standard projects instead of classic .net / asp.net applications, there is a speedup (when working with VS, incremental compiles are still slower due to the lack of an up-to-date check).

Some extensions also slow down VS (or at least the experience), the most prominent one being ReSharper.

There are a lot of tweaks that can make VS a little faster, like disabling Source Control Integration (git, tfs) to reduce disk access or disable CodeLens. JetBrains put together a guide of options to speed up VS+ReSharper that contains useful options even when not using ReSharper: https://www.jetbrains.com/help/resharper/2017.1/Speeding_Up_ReSharper.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM