CLion's "Building symbols" takes minutes when creating a new project

Completed

Hi!

Recently I started using CLion. It's very promising but it gets more and more annoying by the minute.
I can't understand this "Building symbols" thing for example. Whenever I create a new project, so nothing in there yet just the "empty" files CLion creates by default, it starts this process and it takes 2-5 minutes. Until it finishes, I can't do anything. Now, I also use PyCharm, that doesn't have anything similar. I did try to read about this process and understand it but the documentation doesn't make it easy because I couldn't find anything. There are mentions of building symbols taking long with large projects but they must be talking about something else. In an technically empty project it shouldn't build anything, certainly not something that takes minutes to complete and uses all cores of my CPU at 100%. After it's done, it won't do it again, it happens only, only when I create a new project.

So, what's this, why do I need it, why's it so resource hungry and why does it takes so extremely long?

4 comments
Comment actions Permalink

Sorry for the inconvenience! To be able to provide such features as auto import, navigation, etc, CLion should index and build symbols for all header files, including system headers. But 5 minutes is a bit longer than it should take.

Could you please 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. Does that help?

If it does not help, please capture a CPU snapshot so we can take a look at what is going on and send it to clion-support at jetbrains.com.

0
Comment actions Permalink

Thanks.

It's definitely a CPU usage problem, from RAM 2 GB is the default and it uses about 550 MB, never really goes above that. But CPU usage is very high, 95-99% each core while creating a new project. Today it took less time, 71 seconds and 105 seconds, but there was no other apps really running in the background like normally would. But it had its first complete freeze after I stopped the first CPU usage profiling. Made a second, one project's creation took noticeably longer but it didn't crash. It hangs often for a few seconds but never froze before.

Created a ticket and attached the snapshots to it.

 

1
Comment actions Permalink

Hi,
I'd like to ask whether is any way to give to CLion some kind of "default" symbols?

I write often small, quick test projects, using only std library - those have identical settings (except root project path, of course).
CLion is great, but why it always process those symbols from scratch, instead of using some cache or similar solution? :/

(I know, I whine a bit - sorry ;)

Best regards,
draghan

1
Comment actions Permalink

@Anna: my computer core i3 but Ram 10 and Samsung SSD but when creating new C project, it hangs on for 3, 4 mins updating whatever. CLion is very slow compare to Visual studio.

0

Please sign in to leave a comment.