Compile time increased after upgrading PC

Hi everyone, after upgrading my PC and reinstalling Windows, I noticed that my project actually compiles slower.

This is what was changed:

  1. Reinstalled Windows 10.

  2. Added 1TB HDD, Unity installation and project files are still on SSD.

  3. Changed SSD, from 250gb Samsung 970 EVO PLUS SSD M.2 NVMe; 512mb RAM, R|W: 3500|2300 250k|550K, pn: MZ-V7S250BW to Samsung 970 EVO Plus 500GB NVMe PCIe M.2 2280 SSD, R/W: 3500/3300 MB/s (MZ-V7S500BW). Better writing speed and more space.

  4. Replaced GPU, from Nvidia GT 1030 to GeForce GTX 1080.

  5. Visual Studio 2019 instead of Visual Studio 2017.

  6. A slightly different version of Unity, I am still on 2017.4.

I installed all standard programs and drivers, userbenchmark tests are fine too.

Compile-time increased from a few seconds to 10+ seconds.

I am testing this in the same project, and I noticed the slowdown right after I reinstalled Windows with these new components.

Any suggestions on what should I do? I am wondering is there any way to detect what to improve to get good compile speed again? Thank you!

p.s. more details:

CPU Intel Core i9-9900K
GPU Nvidia GTX 1080
SSD Samsung 970 Evo NVMe PCIe M.2 500GB
RAM Corsair Vengeance LPX DDR4 3000 C15 2x8GB
MBD Gigabyte Z390 GAMING X

> Visual Studio 2019 instead of Visual Studio 2017.

^^^ This.

Check system memory usage during compilation phase (task manager or process explorer). It is possible that visual studio devours all ram and your system hits the swap file, slowing compilation down.

2 Likes

Did you whitelist Unity and VS in your anti-virus? If you’re using Windows Defender, adding exceptions for those two programs (and your Unity project as well) have a pretty big impact on Unity performance.

1 Like

Thanks!

Do you mean Windows Security Exclusions list? I tried it now, but it didn’t help.

Disabling Windows Security completely did improve the compile time for almost 1 second though.

I don’t see any bump in memory usage, it was constantly using 10 GB from 16 GB. CPU usage didn’t bump much either, from 9% to 16%.

When it comes to components, what is the bottleneck for compilation time?

EDIT:

To be more precise, recompile time varies and it takes between 11s-13s to recompile the script. After clicking on the Play button, it takes around 6.8s-7.2 seconds before I can see and play the game. 40% is spent on Application.WaitForAsyncOperationToComplete, and 36% on ReloadAssemblies.

You should submit this to VS2019 tech support.