Searched for recent posts on the topic and came up with nothing so am inquiring here about slow compile times. My set-up currently takes about 1 1/2 minutes to compile a "null" program (void setup and void loop statements only). Worse yet, one cannot stop a compile until it is finished but I guess that's another topic.
My set-up is Win 10, 1.6 GHz AMD cpu, SSD and Uno board. Everything is up-to-date version wise. As per advise found in older posts, I have tried shutting off Avast, deleted Trusteer, deleted "recent sketches" in the preferences file, shut off Windows defender all with not much improvement (deleting recent sketches helped a bit - about a 30 second reduction). I have also looked at Task Manager while compiling and nothing seems amiss - CPU utilization never goes to 100% and rarely above 90%.
Is there any more information available on the problem? If anyone has suggestions I would be most appreciative as the long compile times (with no apparent ability to stop in the middle if a problem is spotted in the source while waiting for completion) is getting quite annoying.
It sounds like you did your research and already worked your way through the usual suspects without getting the performance you seek.
One thing you might try is to put the Arduino IDE in portable mode:
Portable mode itself isn't expected to speed up compilation, but this will cause the data folder and default sketchbook folder to be changed to a different location, which is a fresh wipe, so it eliminates some of the potential causes of slow compilation. If you find that fixes the problem, we can then work to bisect the issue to determine which specific change made by switching to portable mode was the one that fixed it, and from there the cause of the problem.
Because portable mode requires the creation of files under the Arduino IDE installation folder, it's very difficult to do with the Microsoft Store version of the Arduino IDE, and even with the default standard installation location under "C:\Program Files (x86)" (because Windows has more strict security for that folder). So the best way to do this is to use the "Windows ZIP file" download from the software page:
then just unzip the downloaded file to some convenient location not in C:\Program Files (x86) to install. You can have the "Windows ZIP file" version of the Arduino IDE installed at the same time as the windows installer or Microsoft Store versions, so there's no need to uninstall your previous installation of the Arduino IDE.
After that, just create the "portable" folder under the Arduino IDE installation folder and run the arduino.exe file to start the Arduino IDE in portable mode.
Also be aware that some additional security programs such as antivirus do NOT turn off fully.
McAfee and Norton are at least two of them.
Turning off fully may require going into the task list or even the services list under windows.
Another method is booting into SAFE MODE and turning off additional security and trying a simple compile from there.
Also be aware that the computer must be your own and not on loan from school or business as they may have additional measures in place that can also cause long compile times.
Thanks gents for the suggestions - I will try them.
In the meantime, I should mention I tried installing the IDE on an older HP laptop (which is unencumbered by a lot of the bloatware I have on my desktop, such as an antivirus). Compile time for the null sketch on this machine is around 5 seconds! I did note something odd however, I ran the compile several times with similar results, but, one of those compiles took over a minute (for some unknown reason; maybe there was something else going on in the background that hogged resources(?)).
An interesting problem for sure. Maybe I'll just switch to my laptop for Arduino work.
Did some more compile timing:
First portion of compile i.e. after first line of verbose output is displayed,
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine ..................etc
takes about 31 seconds.
After next three lines,
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware .....................etc
Using board 'uno' from platform in folder: C:\Users\LAF\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\LAF\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
takes about 34 additional seconds.
The rest takes another 9 seconds. Don't know if all that means anything but FWIW.
Another thing I noticed is that Task Manager/Processes shows nothing I could identify re Arduino programs during a compile, even though CPU usage jumps to over 90% during the last stages of the compile.
One thing to note when you're comparing compile times is that the compiled files other than the sketch itself are is cached, so the first compilation will take longer than the following ones. So be careful not to let that skew your results.
nosmoke:
Another thing I noticed is that Task Manager/Processes shows nothing I could identify re Arduino programs during a compile, even though CPU usage jumps to over 90% during the last stages of the compile.
I get arduino-builder.exe, conhost.exe, and various avr-* executables from avr-gcc (e.g., avr-g++.exe)
Well, after uninstalling Trusteer, deleting "recent sketches" in the preferences file, shuting off Windows defender, and turning off Avast yesterday, decided now to try a Win restart. Compile times for the null sketch are now in the 12 second range! Guess I should have rebooted earlier. >:(
I recall reading in another thread that someone deleted Trusteer and that solved his slow compile issues so maybe that's the culprit, at least in my case (I have Windows Defender and Avast now back on so I guess they're not the issue).
Maybe I'll try reinstalling Trusteer after a while (but not very soon) .....
Thanks again to you folks for the assistance - hopefully it won't be needed again for a while.
I will admit to only having known trusteer as a memory hogging software due to its almost pure online type of usage.
The article I linked to was unknown to me before today but pretty much bang on target.
Interesting article! I too wish I'd have known about it b/f.
I have also BTW noticed a significant increase in web browsing speed w/o Trusteer. Damn, I've thought for months my machine was getting slow but could not put my finger on a cause.
I also just tried compiling a rather large program - could not believe how fast it went. ;D
I'll not be re-installing Trusteer (Trustnot?). Odd though it seems to slow the IDE in such a major way....