Arm Mbed OS support forum

Very high CPU usage after compilation

When MBED Studio is done with compiling a program, the CPU usage shoots to 100% for about 5 minutes.
I understand compiling itself if CPU-intensive, but I’m surprised usage is high after it has finished.

My task manager shows “cland.exe” was responsible for most CPU usage.

I understand this might not be a bug, but I figured mentioning it might be good.

Hello, i dont have a solution, but want to report the same on Windows 10.

Hi @RobertoO , @seffm ,

Thank you for reporting it. Clangd is a tool that Studio uses for C/C++ intellisense. Mbed OS programs are quite big so it takes a while to scan them properly and generate indexing needed for intellisense. Still it shouldn’t take more than ~30 seconds.

Can you tell me what version of Mbed OS and target you see the issue on?

Kind Regards,

30s? Really? I’ve just compiled a program and it took also >5 min on Windows 10 with 16 GB RAM. On Ubuntu, it compiles much faster (using gcc there), maybe 1 minute for a build all.
Does the compiler use multiple cores? I know make has an option -j for the numer of parallel files to compile, but it looks like the Mbed build system does it sequentially. So I wonder why the CPU load is so high during compiling.

Hi @JojoS ,

In my answer above I was talking about C/C++ intellisense generation and indexing. Compilation indeed takes much longer than 30s. Especially on Windows. It’s faster on other platforms. We are working together with a different team in Arm to reduce that compilation time. Issue is connected to compilation of Mbed OS program on Windows and only when Arm Compiler 6 is used.

Mbed Studio on Windows checks the number of cores available on the system and pass it to the Mbed build system.

Arek - Studio team

1 Like

ok, after compilation I don’t see such a load. Windows needs some time to clean up, but not as long.

Because of the long compilation times, I’m using now the remote SSH feature in VSCode. The code is on a ubuntu machine, and I can connect with VSCode from my Windows machine and I can edit and debug like I’m sitting on the linux machine (the target is also connect to the linux computer). Cool feature, thats the advantage of an open system as VSCode. Would be great for Mbed Studio as well :slightly_smiling_face:

Hi Johannes,

Interesting approach :slight_smile: On a similar note there will be a Studio version available soon in a browser. You can find more information about it here: Together with a quick demo. It is using a separate build service for a program compilation. We are considering allowing to use the same compilation service also in the desktop version of the product. No decision has been made yet.

Arek - Studio team

I have same issue.

Hello, same issue here on a fresh installation on W10.