I let Microsoft update my laptop and now I have an issue. My compile times are very slow, in upwards of 8 minutes for a basic ESP32 sketch and no less than 45 seconds for an empty sketch.
This sketch:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Takes 45 seconds to compile for an Uno. Not even transmitting it.
I know this problem has been seen before so I've spent a few days reading any applying potential fixes to no avail.
Here are my specs:
MSI Gaming Laptop with Geforce GTX card
10th gen Intel i5 quad 2.5GHz
16GB DDR4 (2X8)
Arduino IDE 1.8.15
Windows 10 build 19042, OEM product updated to 19042 6 days ago.
Here's what I've done so far:
Disabled Antivirus
Scanned with SFC - clean
Scanned with image health check - clean
Run auto repair on boot - clean
Uninstalled and reinstalled the JRE
Uninstalled and reinstalled the Arduino IDE
Disabled every single non-Microsoft service
Always restarted Windows between each step and retested the compile times
There were no compile issues until after the update.
Why does stuff like this happen in the middle of a project?
In addition to the possible causes you already identified and eliminated, another that has been reported is having one of the folders the IDE uses during compilation on a network or cloud drive.
A quick check for this can be done by putting the IDE in portable mode:
That's not perfect because the compilation is still using the temporary folder, but at least the sketchbook and data folders will then be under the portable folder you created.
@pert Ok, so after many days, reading hundreds of posts, 2 fresh installs, and a few hairs pulled out, I have solved the issue and can quantify in part what caused it.
In October 2020 Microsoft released Windows 10 v20H2. They did not widely distribute it and it is believed that this is because of compatibility issues. Microsoft fixed these issues in later builds of that version. Now here's the kicker, the slipstream upgrade is what causes the issue. Upgrading from v2004 to v20H2 works perfectly, but Microsoft does not require users to upgrade to v2004 first. So users who did not get the v2004 upgrade in the upgrade lottery had to upgrade to v20H2 from a version predating v2004 and that's where it all breaks down.
If you are unfortunate to have gotten caught in this trap be prepared to do a reset followed by an upgrade to v21H1, which is more stable upgrade path for pre-v2004 PCs.
Thanks so much for taking the time to post an update with your solution. I'll take note of this information to share with others who might report the same sort of problem. I'm very glad to hear you found the fix.