CLion Unusably Slow on Large .C Files

Answered

I'm working on a project that has a main '*.c' file that's over 6,800 lines of code in length and over 200kB in size.  Even though the file is error-free, trying to make any edits to it in CLion causes the software to freeze for over 10 seconds until receiving feedback.

Other editors such as Atom, gedit, and Eclipse open this file without any problems.  Are there any settings I could change to improve the performance?

 

PS: Using 2017.2.2 on Ubuntu Linux 16.04.

3
2 comments

Hi, I have a similar problem with a C++ project. I use the CImg library and unfortunately its author thought it's a good idea to ship it in one, huge .h file of 60803 lines, i.e. 2.8MB. Any file in my CLion project which includes CImg is impossible to edit. Is there anything I can do about it, even at the cost of losing "code insight" features for the CImg header?

 

Thanks!

0

Hi! You can try enabling memory indicator (`Preferences | Appearance & Behavior | Appearance | Show memory indicator`) and keep an eye on it for some time. 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, this might help.

0

Please sign in to leave a comment.