Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

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

  1. #1
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    171

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

    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.







    .

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,018
    Any chance you could also measure the effect on compile times using only the Arduino IDE?

  3. #3
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    171
    Sure, here a complete dataset. (Measurement repeatability is about 2s (estimated))

    Click image for larger version. 

Name:	compiletimes.PNG 
Views:	42 
Size:	19.7 KB 
ID:	12316

    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 by luni; 12-17-2017 at 01:32 PM.

  4. #4
    Senior Member bmillier's Avatar
    Join Date
    Apr 2016
    Location
    Halifax, N.S. Canada
    Posts
    127
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •