IDE 2.1 High CPU usage

I've seen the complaints 6 months ago about unacceptably high CPU usage while the IDE is not doing anything. When will this be fixed? My desktop's cooling fan sounds like the desktop is ready for take-off :face_with_diagonal_mouth: :face_with_diagonal_mouth: :face_with_diagonal_mouth:

Hi @gilbert54

The developers investigated those reports of exceptional CPU usage and made fixes and efficiency improvements last year. The affected users reported that the problem was resolved to their satisfaction.

So, as long as you are using a modern version of Arduino IDE, the problem you are experiencing is different from that experienced by the users who submitted the reports last year.

Something you should know is that Arduino IDE 2.x automatically runs a compilation process your sketch in the background after every time you open a new sketch, select a different board, or edit the sketch code. This is done because Arduino IDE 2.x has valuable "code aware" features (AKA "intellisense") that require an understanding of the complete sketch program. It is expected that the available computing resources will be used for that compilation process. So it is normal and expected to see a temporary spike in CPU usage whenever the compilation process is triggered. You will see an indicator that Arduino IDE is performing this at the left side of the status bar in the Arduino IDE window.

So if you are only seeing this during those processes, then this is normal and expected and you don't need to worry about it. If you are seeing it when the IDE is truly "not doing anything", that would be unexpected and the forum helpers may be able to assist you with an investigation.

@ptilisch thanks for the prompt reply. I'm using IDE version 2.1.1, which to my knowledge is the latest and greatest (?) version. While my CPU is blowing me away the IDE is idle (or should be). I'm not compiling, loading, altering anything. Even when I'm back from refilling my coffee cup the CPU cooling is still screaming. My Desktop is nearing retirement age, but I've never seen this with other "intellsense" applications (like MS visual studio).

When I close the IDE, CPU usage drops instantly to about 3..4 %.

Even during compilation CPU usage looks OK

While editing the sketch


... and it never returns to normal until I close the IDE.
The timeline on the graphs is 3 secs per interval.

Do you see a message like "indexing 3/27" or "Building sketch" on the left side of the status bar at the bottom of the Arduino IDE window while the IDE is producing this unexpected CPU usage?

While compiling the CPU is at 100 %

After that nothing interesting going on in the IDE...

I might add that CPU usage goes back to +/- normal after compiling the sketch. It only gets ugly when I do a few edits to the sketch.

Believe it or not... I left the IDE alone for a few minutes and now CPU usage is jumping around between 5 and 20 %...
I'm not doing anything in the IDE.

Had another look at my task manager. When the IDE is consuming CPU, it's the clangd.exe which is playing up and never shutting up. For some reason clangd.exe doesn't stop going crazy when I leave the IDE alone. Except now of course..

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