Current Windows Update (V1709) slows down compiling with Visual Studio

Status
Not open for further replies.

luni

Well-known member
I'm using VisualStudio 2017 and makefiles to compile (probably visualMicro will show the same issue) and noticed that the current Windows update (1709) significantly slows down compiling (~factor 3). After a lot of googling and experimenting I identified Windows Defender as source of the irritating slow down. (I don't use any other virus scanner). In case you observe the same behavior you can easily check by temporarily disabling the real time protection

a) Disabled Real Time Protection:
Teensyduino core library: 11s
Recompiling after just touching main.cpp 0.5s

b) Enabled Real Time Protection:
Teensyduino core library: 30s
Recompiling after just touching the main file 3-5s

Solution:
You can exclude complete folders from scanning in the Defender Options. I excluded c:\Program Files\Microsoft VisualStudio and the folder containing the build tools (gcc, make). Excluding those folders brought back the compile times to the usual 11s for a complete recompile (using a quite old desktop PC with a magnetic hard disc).

Hope that saves time in case somebody faces the same issue.







.
 
Sure, here a complete dataset. (Measurement repeatability is about 2s (estimated))

compiletimes.PNG

The differences for Arduino are not so pronounced. Anyway, excluding the Arduino folder in the Defender settings works for Arduino as well. The larger compile time (compared to vs2017) after touching the sketch file is probably due to the fact that for some reason the Arduino builder tends to recompile more than only the changed files.
 
Last edited:
Thanks so much Luni. After the last Win10 update a few days back, VS/Visual Micro had slowed to a crawl. Before doing as you suggested, I clocked about 60 seconds to initially compile a T3.5 program, about 8 seconds to re-compile (with just a trivial change to the main prog code to force re-compile). After excluding both the "documents\Arduino" and "C:\Arduino1.8" program folders, it only takes a second or two to re-compile.
Although I did not time the Arduino IDE before doing the folder exclusion, it had been as badly slowed down as VS/VM.
 
Status
Not open for further replies.
Back
Top