by cmrdporcupine · 7y ago · 0 comments
My problem is they've done a terrible job of making it scale up to large code bases. I work on the chromium tree -- CLion is completely useless on it. I have a dual 24-core xeon with 128GB of RAM and SSD and I've given it a wackload of memory, and it becomes completely inoperable, freezing all over the place.
Awful because I have such muscle memory for the JetBrains tools, and such a fondness for them.
I've gone back to using Emacs, but now with Eclim. I just couldn't get into VSCode.
The same IntelliJ can't compete with Eclipse on handling large scale projects.
CLion gets all the bad from IntelliJ .
On this point of view, Visual Studio 2019 has improved much more on a performance perspective and can still handle large scale projects.
So far, I prefer VS and QtCreator, which have also a free license too. I don't understand why CLion hasn't a Community Edition just like IntelliJ
For comparison: I work on something a magnitude smaller: https://github.com/CleverRaven/Cataclysm-DDA/ ... about ~360,000 LOC. CLion is pretty great for that.
I'm curious, have the VM garbage collection and allocation settings been adjusted? In other words, not just the memory limits but also switching to a different garbage collector and the GC control mechanisms adjusted? I've been reading up on the collectors. As far as I can tell the G1 collector is strongly indicated when you go above a 4 or 8GB heap. It then has a number of settings to adjust. I got really good and smooth performance out of it - few and short enough pauses that I was at peace with CLion - but seemingly I set the garbage collection to be "too continuous" which caused constant CPU usage when I used that profile in Pycharm on a Python project. Had to switch Pycharm back to a more, uh, classical GC setup. (I didn't reconfigure to rein it back in as it was unnecessary in that context. I'm sure it's possible.) The JVM and the GC are a rather interesting beast.
Just curious :)
CLion seems to struggle in particular with the presence of the out / generated source directories in Chromium. Even when asked not to index (exclude), the mere presence of the directory seems to bog it down.
The tool also needs to have a more flexible notion of source roots/include roots. I should be able to notify it that a directory is an #include root without having it try to index every .c file etc. underneath there. I should be able to select a group of directories and say "these have headers, but they're relative to path X, rather than themselves" etc.
It's even worse when adding in our internal repositories on top.
Also having a back and forth on a ticket about their support for compiler_commands.json; the one generated by ninja for Chromium simply doesn't work for me. Their person says it works for them, though. I don't know how. Right now I manually create a CMakeLists.txt with the directories I need.
But one thing that is discouraging about CLion is that even directories that you explicitly tell it not to index as source seem to still be looked at and indexed in some fashion, so a huge number of files just drags it down to a halt. My coworker was able to get decent performance by creating an empty directory and symlinking in only the directories he is working on. Simply having directories with large quantities of files is enough to drag it down.
It's very disappointing, as its my tool of choice. I feel handicapped without it.
That being said, having worked on chromium myself I can attest to the size of the code base being such that pretty much every tool shits itself.
At the moment that's my number one issue with CLion.
I really really hope they can fix this because at my work I'm trying to get CLion working. The Codebase is quite large and I have to turn inspections off or else input freezes and won't be responsive for up to 30 seconds. It's at times unusable.
When it works it's amazing but it still has some ways to go.
This statement is false. It's way too broad a claim to hold up. With all due respect I'd consider it harmfully incorrect.
Counterexample: I use CLion to work on Cataclysm: Dark Days Ahead. It's ~360,000 lines of pretty hairy C++. It's fine.
There may be conditions that make a stricter definition of the claim true. I don't know what those conditions would be. A link to Jetbrains' definition of the issue would be good.
Obviously there are (many) reasons for that. What you think is hairy might not be that hairy, in terms of parsing, to a compiler or static analyzer. If you're like most game developers, you use a simple subset of C++ that's C-like, which might explain why you're lucky.
Maybe the word 'tiny' was excessive. It might not affect someone's homework, but in my case it definitely does have performance issues for my relatively small one-man projects. I'm not bashing the tool; I'm a paying user too. But no one can deny the many performance issues, and indeed the focus of the next major release is precisely to start addressing those.
I also used AppCode extensively, that one actually behaved pretty well, overall.
So I am not really surprised by CLion's performance/stability issues. I have a long love/hate type thing around this with Jetbrains.
I hope they can get these things sorted out.
I often wonder if they wouldn't be better rewriting in a non-GC'd language. Rust or something.
It's a question of for-all-x vs. there-exists-x. I acknowledge that there exist x'es that are small projects that make CLion hang.
I just wanted to make sure it was known that it's not all x'es. And that there exist y's that are large projects that don't hang. Cataclysm DDA is not a simple codebase :)
I've run into this issue, also. It's not Visual Studio levels of constant freezing, but it definitely pauses once in a while. Seems to mostly occur when I'm developing on Windows, though.
EDIT: Wanted to add that it's definitely a regression. I've been using CLion without the pauses for years.
Also, what range of CPUs is your xeon on? Buying a current-gen consumer chip could yield a huge performance uplift if it's not from this gen.
You can generate a compiler_commands.json from ninja for these tools. I don't have the command handy -- but you can google for it.
They all perform quite admirably when compared to CLion, unfortunately.