6 ms·
CLion is an amazing tool -- I've purchased licenses for my personal self in the past, but my employer pays for it these days. My problem is they've done a terr
by cmrdporcupine 7y ago
CLion is an amazing tool -- I've purchased licenses for my personal self in the past, but my employer pays for it these days.
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.
- gravypod 7y agoHave you tried pinning the IDE to one NUMA node? Text editors are pretty random access and will not have a fun time across numa nodes. 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.
- pnako 7y agoIt's slow and freezes even on tiny projects. They're aware of the issue and apparently the next release will be focused entirely on trying to address those. At the moment that's my number one issue with CLion.
- vinayan3 7y agoI had similar issues when I included the standard library with templated data structures and googletest. The IDE would consume my entire MacBook Pro 2016. The UI froze, input would be delayed on the orders of 10s of seconds, and I can go on... 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.
- AnthonBerg 7y ago> It's slow and freezes even on tiny projects. 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.
- sjapkee 7y agoIt works fine only if inspections are turned off.
- batty_alex 7y ago> This statement is false. 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.
- AnthonBerg 7y agoTo clarify: I believe that it can happen even with tiny projects, under certain circumstances.
- pnako 7y agoI don't think I'm making an extraordinary statement. If you look in their bug tracker, there are 500+ tickets with the term "freeze" in it. The reason is actually known: being a Java IDE, the design takes for granted that many operations that are almost instant in the Java world can takes many seconds in the C++ world (meaning they'd need to put that in the background instead of blocking the GUI). 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.
- 01100011 7y agoSlickEdit isn't cheap, but I feel like I've gotten my money's worth over the years. It can handle tagging yuge codebases and still stays responsive.
- mister_hn 7y agoJava-Based and Chromium-based IDE suck a lot on large code bases. 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
- piokoch 7y agoHere I am surprised, I've started paying for IntelliJ because I couldn't open huge project in Eclipse.
- AlEinstein 7y agoSecond this. I've found IntelliJ to be much faster on large codebases.
- mister_hn 7y agoOn a multi-artifacts maven JavaEE project (not submodules, just a lot of independent modules), it has serious difficulties. Support for Java12+ is far better than Eclipse, but working on IntelliJ and using auto-formatting tools (Checkstyle and Save-Actions) makes it suffer enormously. I've never had those problems on Eclipse. I had to assign over 4GB RAM to handle more files (by default it is set to 2GB max)
- AnthonBerg 7y agoInteresting. Chromium seems to be huge indeed. I googled statistics: 3+ million lines of code? Is that about right? (Not that LOC is a great universal metric of everything, but it's something.) For comparison: I work on something a magnitude smaller: https://github.com/CleverRaven/Cataclysm-DDA/ 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 :)
- cmrdporcupine 7y agoYes it's a massive project. I've attempted all sorts of GC tuning. I'm not convinced it's all GC issues; I think whatever data structures or algorithms they are using for their semantic tree must not scale well to extremely large data sets. It also doesn't seem to be terribly friendly to high concurrency. Having lots of cores doesn't really help. 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.
- AnthonBerg 7y agoMany thanks! I assumed that GC tuning had indeed been attempted.
- zerr 7y agoDid you try other setups? Maybe you could share what your teammates use? (Also working on the chromium tree, in search for a better environment)
- cmrdporcupine 7y agoI use Emacs + Eclim. Other coworkers use Vim + you complete me. Or just raw vim, because they're far more patient than me. Others us VSCode + clangd, etc. 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.
- cmrdporcupine 7y agoSorry, I meant to say Eglot, not Eclim. Too many E in my Emacs.
- zerr 7y agoThanks for clarifying, but neither Emacs nor Vim is my cup of tea :)
- nybblesio 7y agoYou may want to give the CLion 2019.3 EAP build a try. I was having the same issues as you with a very large (~1 million SLOC) C++ code base. To my surprise, the EAP build has seemingly removed almost all hesitation/hanging. They did rename the keymaps for some odd reason, which I worked around by extracting from a previous version's resources.jar file and placing in my preferences directory.
- cmrdporcupine 7y agoI have been using it. No real improvement. Freezes all over. And I gave the GC something like 20gb. 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.
- derpscot 7y ago20GB what? Xmx? That high is going to cause you really massive GC pauses... Maybe try winding that down a bit?
- cmrdporcupine 7y agoI've tried everything inbetween, so.
- ensiferum 7y agoSo it's an amazing tool but actually not so amazing? 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.
- cmrdporcupine 7y agoSorry, I meant to say Eglot, not Eclim. Too many E in my Emacs.