Code analysis is slow

已回答

Overall speed of code analysis(e.g. code inspection, creating code completion list, ...) is slow in my PC.

For example, if I changed the name of unused variable:

 

I don't think it should take 4~5 seconds to change the color of modified text to grey, or generate auto completion list item for 'at'.(In IntelliJ it is faster than this)

Is there any way to increase code analysis speed in CLion? I'm using Windows 10 and WSL.

6

In *my* case, I found out that clangd processes took 100% CPU time on their respective cores.

You may see those using htop in linux, getting at 100% when the interface stops responding.

Quickfix: deactivate clangd in options. Without clangd, you will still have completion working and most important features.

4

Hello! 

If you use not the latest version (2019.1), please update CLion.

Performance problems may be caused by insufficient amount of memory. To speed up the processing you can try enabling memory indicator (File | Settings |Appearance & Behavior | Appearance | Show memory indicator) and keep an eye on it for some time (the indicator will appear in the bottom right corner of the CLion window). If it is close to the limit at the time when you are experiencing the problems, then try increasing the Xmx JVM option according to this guide.

If it doesn't help, please capture a CPU snapshot and send it to clion-support at jetbrains.com.

1
Avatar
Permanently deleted user

I've reinstalled CLion but code completion (more precisely, code completion for STL) and inspection speed is still slow especially when I use WSL environment. I increased Xmx size to 4GB. (Maybe because it needs SSH connection?)

1

Same problem here, Windows 10 WSL 2. Project is on the WSL filesystem. Turning off clangd immediately sped up everything.

1
Avatar
Permanently deleted user

Is CPU profiling impossible in Windows?

https://www.jetbrains.com/help/clion/cpu-profiler.html 

0

As it's written in this web-help article, the profiler is available on Linux and macOS. Note that this profiling is about performance of your application.

0

It's hard to say without diagnostic information. Please capture a CPU snapshot and send it to clion-support at jetbrains.com.

0

Same problem on Windows 10 WSL 2, significant delay for code completion to pop up. Turning all clangd features off makes it significantly better.

0

请先登录再写评论。