CLion Code Inspection Becomes Extremely Slow After Being Upgraded To 2021.1

已完成

I've been using CLion 2020.3 for nearly half a year and recently I upgraded CLion to 2021.1. I started my first project with CLion 2021.1 yesterday and I quickly found the code inspection became extremely slow. The code is less than 300 lines and only four files are involved, but it takes CLion for about 40 seconds to highlight a single file. Moreover, it shows a class member as "never used" after the function related to that member was written. There were much more problems with syntax analysis and clang...

I opened the heap indicator and it only used 300M/2000M. When I hang my cursor over the error check symbol at the upper right corner, it shows CLion was doing "slow inspection". The "slow inspection" took several tens of seconds to finish.

 

I rolled my CLion back to 2020.3 minutes ago and suddenly, the code inspection takes less than 1 second to finish.

 

What's the problem with CLion 2021.1?

0

Hello!

In CLion 2021.1 we've introduced Global Data Flow Analysis - https://blog.jetbrains.com/clion/2021/01/clion-starts-2021-1-eap-global-dfa-project-view-cmake/#global_data_flow_analysis. Maybe it affects the code analysis in your project in this way.

Could you please try disabling clion.dfa.global in Registry (Help | Find Action... | Registry...) in CLion 2021.1.1 (please use 2021.1.1, not 2021.1)? Does it help?

 
0

Dear Anna,

I disabled global DFA and the code analysis is still very slow. Here are screenshots of the Registry... and the code analysis pop-up window. After global DFA is disabled, it disappeared from the Registry...

0

Please capture a CPU snapshot (https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems) while reproducing the problem and send it to clion-support at jetbrains.com.

>After global DFA is disabled, it disappeared from the Registry...

Most probably it's just at the top of the list now.

0

This issue is marked as completed, although, I'm experiencing same issue. I was before on 2020.2, and everything was working correctly.
On 2021.1.2, whole code inspect and auto complete is extremely sluggish, even with disabled DFA, resulting in very bad programming experience.

Any ideas what can improve the performance? Thanks

0

In fact, the problem isn't solved because I recently have no time to upgrade my CLion to 2021.1 again and measure the CPU usage. I'm still using 2020.3. I will provide a CPU inspection when I have time to do so...

0

Also, I didn't mentioned in my comment, but I would expect some slow-down on low-end PC, but this happens on 16-core Ryzen 3950X, with 32 GB of RAM, and all this is running from NVMe SSD, so I'm kinda confused what's going on

0

Update: I decided to run CPU Snapshot on latest version, I installed latest 2021 once again, but surprisingly, everything works well. I will try to work in it more if it will be able to reproduce after some time of usage, and then make CPU snapshot.

0

请先登录再写评论。