Arduino IDE 1.8.3 High CPU Usage

I have just installed the Arduino IDE 1.8.3 on an older laptop - Windows XP Pro SP3, 32 bit, Pentium 4, 1.6 GHz, 2GB RAM.

Now when the Arduino IDE is open and idle, the CPU usage goes from below 1% to 25-30%. The offending processes are "services.exe" at ~18% and "javaw.exe" at ~7%.

Is this normal?

I did an unzip type installation, I did not intall this on the system.

The only other program that had similar behaviour was Python IDLE, with about 14% CPU usage at idle. Everything else pretty much goes down to zero when idle.

I have been getting around this by writing my code in Notepad++ and only starting the IDE to upload the sketch. But I would like to fix the issue so I don't have to do this.

It is possible that security software could cause these types of issue. Best bet is to whitelist / exclude the Arduino software even on a zip install.

In fact more so on a zip version as some security software may realise its temporary nature and keep interrogating it looking for a problem that is not actually there.

AVAST can cause some issues with the CREATE online editor and was known to slow down the desktop IDE by up to 60%.

Programs that compile and assemble code can often result in "false positives"

An initial surge with an IDE can go as high as around 25% usage but usually settles down to around 12% on the regular INSTALLED IDE.

There is a lot of MYTH about CPU usage and what can be regarded as high or low so another thing is not to take individual processes CPU usage as a defacto figure. You can make a figure go high just by using task manager itself so only use that as a very very rough guide.

I have added the Arduino directory to the exceptions list in the Avast antivirus, but that did not make any difference. Unfortunately.

My best guess is that the problem is with very inefficient code behind the IDE. Or it is doing too many unnecessary tasks "just in case", such as polling for various devices being plugged in, polling for user events, etc.

I will continue using Notepad++ for my editing needs, until the IDE gets more efficient. It is a better editor, and with hardly any CPU usage.

Thanks.

It is more than just a folder you add to exceptions.

That it is older hardware pretty much past its sell by date could add to the issue considerably.

It looks like the IDE runs about twice as fast on your computer.

I am guessing your computer is probably 2x faster than mine. So there is probably nothing wrong with my installation and it runs as it should.

I just don’t find such high CPU usage acceptable, when all I am doing is editing code, or doing nothing at all.

Well, I just tried this same Arduino IDE 1.8.3 on a desktop with a quad-core processor, 3.40 GHz, 16 GB RAM, running Windows 10 64-bit, and there was very little impact from the IDE, maybe one percentage point.

I am not sure the faster processor accounts for all this improvement though. Could the IDE be optimized for Windows 10?

Crazy as it sounds has the bios on the older hardware been optimized correctly ?
Does one box have a proper GPU or “onboard” ?

My spare test box (older dual core AMD) with only 2 gig ram runs win 10 just fine and ran XP x64 really well.

The server (much older dual XEON ) also runs both CREATE and desktop IDE’s just fine even with the OB GPU.

This box is just an older x4 bulldozer but on all the boxes the bios is set up correctly and any security is set to avoid ALL ARDUINO related items and they all have very similar response times in both CREATE and desktop IDE’s.

I could pull out a spare XP box single core but I already know that too will do double duty on the IDE’s with not too much overhead.

I dont think you can optimize the IDE per-se but you can certainly improve its environment.

Maybe an older IDE such as 1.6.5 would be better on the old hardware but you would loose a couple of nice features such as the precompile available in the newer IDE’s

On all my boxes the services are also tweaked so as to provide better performance and avoid running unwanted ones. BlackViper has some nice help with that.

I am not there so cleaning up and setting things to the best is something I cannot do from here without RDP or similar.

Best I can do is attach a couple of files that may have some helpful sections in them for you to try.

Arduino troubleshooting made easy.pdf (522 KB)

CLEAN UP BEFORE INSTALLING ANOTHER COPY OF THE IDE OR ARDUINO CREATE.pdf (345 KB)

There are quite a few steps to ensure the computer is safe to use again.pdf (154 KB)

The old laptop has NVIDIA graphics card on it.

The BIOS is set up correctly, I believe.

I will look at the other material you have posted.

Tweaking a bios on a lappy may not give you much when compared to the bios on a full size box but its still worth digging around if you are comfortable with that.

The OB GPU will also be a bit of a bottleneck too on a lappy despite the brand.

Services on XP will likely give you the best results and dropping any other software that may inadvertently be a slow down issue.

I used to do a lot of this for a living btw so its not just ideas.

I have been using 1.8.1, upgraded to 1.8.5 and the bug persists
Now I have found a way to reproduce it, it seems to be related to serial monitor.
Focus the main IDE windows (click on it) and then remove the focus (click something else, e.g. desktop)
Do this twice in quick succession, the CPU usage goes to ~30% (1 of 4 cores 100%)
When you open serial monitor (or have it still opened) and give it focus, the CPU usage goes back down.

Are you running a sketch on your Arduino that does output to the serial port? Various bad things can happen when a port is receiving a bunch of data that isn’t being read…