Performance and memory problems when using CLion

Assuming you have a fairly large code base in modern C++, or rely heavily on templates or macros usage, performance and memory issues during indexing and editing are possible in CLion. While we constantly work on improving CLion performance and memory usage, we recommend you check these Performance tuning tips in our web help:

To report a performance problem, please follow these instructions. To find IDE logs to attach to the problem, use this link.

 

26 out of 130 found this helpful
89 comments

This is laughably bad. I am having the same memory problem as most others on this thread. I have been a paying customer for years but that is about to end.

0

Hmm, I didn't have the CSV plugin in my plugins, so maybe it is an additional issue,  I experienced it because the ChangeReminder plugin which scans filesystems and holds paths for files to notify when changes happen may have been recursively scanning in an endless loop.  With .git you have a huge set of files and diffs inside of the .git directory.

 

The main thing that did it for me was disabling this, which in turn disabled the git plugin.

0

FWIW an update for the CSV Plugin has been pushed, with mention of a memory issue in the change notes; might be worth updating

0

Same memory issue with phpstorm 2020.1.1.  Only temporary solution I found is to downgrade to 2019.3.

1

I am having the same issue with Ultimate 2020.1.1.  I almost returned my MAC.  Jetbrains - you guys must be better.  I have submitted the logs to both Apple and Itellij. You guys are better than this.  I had to downgrade like Ferx suggested.  I don't know what I lost by doing that.  Note: I am doing react-native development on a MacBook.

 

Edited by Garfield Heron
0

Had the same problem. Disabling the CSV plugin solved this.

1

Still the same problems with memory usage and CSV plugin. This is getting ridiculous 

0

Domas,

CSV plugin is a 3rd party so please report the feedback to the plugin author.

As for the memory issues unrelated to the plugin, please submit a memory snapshot to our support or tracker for investigation.

0

I have had problems with IntelliJ memory usage for years. I've upgraded to a 32GB MacBook Pro and still have problems depending on what I am doing. As long as I only have a couple of projects open it seems fine. But with all the projects I work on open it eventually has serious problems. Intellij is responding fine right now but its virtual memory usage is ridiculous. I've configured it for a 2GB heap so it is obviously using an enormous amount of off-heap memory.

0

@Ralph, please capture a memory snapshot and submit it to IntelliJ IDEA support. The team will investigate.

0

For the JB crew, this issue is years old now and has been reported over and over again by dozens of users. Asking everyone to turn in their logs is not the answer. There is obviously a core problem with your product or it would not be this widespread and this long lasting.

0

Daniel,

I see your disappointment, but in this thread, people are reporting completely different issues from different IntelliJ-based IDEs. So the reasons are different. Some issues are more obvious than others and definitely on our radar and in the roadmap planned or in work already. Others - depends on some particular project, setup, configuration, and often to investigate them we need thread dumps, CPU and memory snapshots or IDE logs, that's why we are requesting them.

0

As requested, I created a ticket and uploaded the hprof zip. However, I suspect that the issue is in off-heap memory so I am not sure how much help this will be.

.... And as I suspected I received an email saying the hprof was useless.

Edited by Ralph Goers
0

Ralph,
Can you please point me to the ticket? I'll try to check and help.

0

Ralph,
You got a reply from the team and I guess there is a good recommendation to check.
You can also turn on the memory indicator in the IDE to see how much it uses exactly (right-click in the bottom right corner and turn on the memory indicator).

0

Yes, I got an email. I have had the memory indicator on in Intellij since I started using it many years ago. But I believe it only shows on-heap usage, which I don't believe is the problem.

0

Ok. Anyway, as it was said seems it's not about Java memory but some native libraries and frameworks. Please share your concerns in the support ticket. I'm sure the team will provide you all the necessary explanations.

0

For me, the memory increases when I place the cursor on a line that contains a suggestion, like class import and then I use the keyboard key combo to resolve the error "import class". Immediately, the heap spikes and the app runs out of memory.

1

Dear Jetbrains folks, I am encountering this issue among several others in the new 2020 builds (used 2020.1 and 2020.2).

Last day I had to delete all of my .idea folders to prevent the IDE from crashing on start right away.

This is unacceptable. Fix you 2020 releases! I am a professional getting paid to program not beta testing your latest features. I will eject myself from your ecosystem if you can't deliver a stable product in the future. I'd rather use VSCode than dealing with crashing IDEA's half of the time.

 

Sincerely, one of your IntelliJ ultimate users

2
CLion 2021.1.3
Build #CL-211.7628.27, built on July 1, 2021
Licensed to CLion Evaluator
Expiration date: August 12, 2021
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.8.0-59-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 98304M
Cores: 16
Registry: run.processes.with.pty=TRUE

Current Desktop: ubuntu:GNOME

The IDE runs out of 64GB of memory after a few hours since launch. The project is C++ and is not that big. Where shall I submit the memory dump?

I'm evaluating CLion and apparently, it's very bad. SSH remote deployment takes forever and never completes.

The CSV plugin is not installed.

Edited by Serge Rogatch
0

@Serge Rogatch, this looks like a bug. Can you please use Submit a Request here to submit the dump to our support engineers?

 
0

Anastasia Kazakova , sure, thank you for a quick response. But how do I generate the memory dump without running out of memory? When CLion runs out of memory, it sometimes shows a notification to create a dump, but it is no more usable, so can't really dump.

0

Serge Rogatch I suggest you capture memory snapshot a bit before it's running out of memory (here how you can do it https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems#memory_snapshot). You can also enable memory indicators (right-click on the bottom right corner and select from the menu) and track how it goes to capture the moment it's leaking or grows unlimited.

0

Let Resharper ++ be backend of CLion. Clangd code inspection is really really much slower than reshaper ++'s.

 

0

Seungwoo Kang Why do you think clangd is slower? How do you diagnose that in CLion? 

0

Similar experience here as well. I've been trying out Clion time to time since 2016 or 2017. CLion was almost unusable due to those slowness and resource consumption issues back then, and still those issues exist in the most recent version as of now. Although I have a CLion subscription, I always end up using VS Code after struggling with CLion while my deadlines are approaching.

0

I must admit the performance is hilariously bad. I have a code base that is approx 200k loc.


I've thrown 8Gb of RAM at clang-tidy, and increased max heap size to 16 Gb and excluded all unrelevant folders from the project tree.


After a single key press between clang-tidy, java and ion.clang.main the CPU cores at pegged at 500-700% for around half a minute.


ion.clang.main seems to suck one full core even when nothing visible is happening.


I have 16 physical core workstation with 64Gb RAM and it can *barely* run this. Not to mention the fan noise and heat. I'm basically going to have to add hearing protectors to my work tools when the computer takes off like a jumbo jet whenever I program in Clion.


Unfortunately the situation seems to get worse from one Clion update version to another. even while the completions get more sluggish and more latency is added to before the code changes are understood and no longer marked as "error".


I understand this is a ramble and I know this is a hard problem, but srly, Visual Studio Express was able to do this 20 years ago on the current era machines. At this point I might just throw out Clion and go back to Emacs/VSCode and get the same developer tooling support at much less resource consumption.

0

You're hitting a specific performance issue here, the devil is always in the detail, and frustrating though it is, it's a mistake to assume that it's a universal issue. I can't help you diagnose it, but there is almost certainly a small configuration change you can make that will magically resolve it.

0

Please sign in to leave a comment.

Have more questions?

Submit a request