Slow compile times with Windows 10 build 19042

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.

I have no networked or cloud drives. Just one very fast PCIe SSD.
I will try this anyway.
Any port or in a storm, or any pert as it were.
Thank you

1 Like

Do you use any AV software? If so turn it off and try again.

First item on the list.
I forgot to mention it, but I even added Arduino's program folder to Norton's exclusion list.

Sorry, I missed that :frowning:

Have you checked that Norton is definitely inactive? Windows Defender too? I found some AV software very persistent, only safe way was uninstalling.

1 Like

Yup, that was done when all non-microsoft services were disabled. Good question though.

@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.

6 Likes

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.

Regards, Per

2 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.