CLion Starts 2019.3 EAP: Performance Improvements, Clangd-based Code Completion & Remote Debug via gdbserver

Posted on by Anastasia Kazakova

Hi,

Today we are launching the Early Access Program (EAP) for CLion 2019.3. We plan to release it by the end of this fall and, as you may remember, it was announced to be a special Quality-targeted Release.

As usual, the EAP builds are free to use and no license is required. The main goal is to test them in all kinds of non-standard or unusual environments you may have set up, and collect and fix as many issues and regressions as possible. So go ahead and grab a fresh build to try it now!

DOWNLOAD CLION 2019.3 EAP

Build 193.3519.24 is available from our site, via the Toolbox App, or as a snap package (if you are using Ubuntu).

CLion 2019.3 EAP

Key highlights:

Clangd-based code completion

To eliminate performance issues and lags, we continue integrating with the Clangd-based engine in the areas where it provides an advantage. This time it’s code completion.

CLion has several providers for code completion, which now include Clangd. The results are shown to you as soon as they arrive, so usually the first results come from the fastest provider. Clangd however produces the results in batches by 100 options. So in the performance metrics shown below, we’ve measured the time (in ms) to get the first 100 results (or fewer, if there are less than 100 results in total). The measurements were taken on a Core i7-8750H PC with 32 GB of RAM running 64-bit Windows 10.

On regular middle-sized projects, the results turned out to be quite similar for Clangd and CLion. However, on projects with known performance issues and lags due to CLion’s code completion, the results are very encouraging.

First comes LLVM (natural choice as we tend to dogfood CLion for Clangd development in the team!):
Code completion: LLVM
For the Eigen library, the acceleration is even more exciting!
Code completion: Eigen

A similar (or even better!) boost can be observed for Boost. For example, for boost::multi_index, nearly any completion for the multi_index_container is way faster (125 ms on Clangd vs 25,000 ms on CLion’s own engine).

For the Qt library, we observed a reasonable boost as well:
Code completion: Qt
You may ask, “Why do you keep the existing CLion code completion engine at all?” The main reason is that it offers additional results that are not yet possible to achieve with Clangd-based code completion. These include, for example, showing not-yet-included symbols, providing some reasonable hints for dependent code in templates, and so on.

So now, it’s up to you to check Clangd-based code completion on your project and see what kinds of speedups you get. Let us know how it goes!

Optimizing Building/Updating symbols step and fixing UI freezes

As we’ve already shared with you, in June our team ran an internal performance week / hackathon (along with the IntelliJ Platform team), playing with several fresh and brave ideas to improve the IDE’s performance. We focused mainly on optimizing the Building/Updating symbols step. The successful experiments have made their way into this 2019.3 EAP build.

Depending on the project and system characteristics, the boost is 10% to 50%, according to our measurements. This is covered by such tickets as CPP-16552, CPP-16991, CPP-16992, and some others. Note that these results are heavily dependent on the specific project, CPU, and environment you’re using, so please let us know whether you notice any improvements in your setup.

In addition, several UI freezes have been fixed:

We will continue coming up with various performance improvements and eliminating freezes, so stay tuned!

Search only for code usages when doing a Rename refactoring

Previously, when you called up the Rename refactoring for a variable, CLion first searched for all usages of the variable, including non-code usages such as string literals and comments. Then it suggested choosing between "Rename All Usages" and "Rename Only Code Usages". This could be very time-consuming and not even needed, if you really just wanted to rename only code usages.

Starting now, the Rename refactoring can ask you to make this decision before the actual search. To switch to such behavior, go to Settings/Preferences | Editor | General | Refactorings and turn off the setting ‘Enable in-place mode’ (it’s on by default). Then, when you press Shift+F6 / ⇧F6, CLion will first suggest the Rename dialog. Clear the checkboxes in this dialog (“Search in comments and strings” and “Search for text occurrences”) so that CLion searches for code usages only:
rename dialog

Launching remote targets automatically under gdbserver

Until now, if you did not use the Full Remote Mode in CLion, but built locally and just wanted to debug an executable running on a remote machine under gdbserver, you had to launch your program under gdbserver manually. Now, the hassle is gone – CLion will do the job for you!

To get it working, create a Remote GDB Server configuration instead of using the GDB Remote Debug configuration. Fill in the credentials of your remote machine and wait for the connection to be established:
Remote GDB debug

Now, if you select this Run/Debug configuration, you can debug on a remote machine via the remote gdbserver.

Other changes

Among other changes you will find:

  • Microsoft’s predefined formatting and naming style was added to the list of predefined styles in CLion:

MS style

  • To prevent situations when virtual functions accesses the resources that are not yet initialized or have already been destroyed, CLion gets a new inspection that detects virtual functions called from constructors or destructors. (Note! The inspection works only when Clangd is enabled.)
  • CMake 3.15 is now bundled.
  • Spell Checker now works in CMake and Doxygen comments.
  • CLion now bundles the Markdown plugin. Note, that if you have a Markdown Navigator plugin installed, this might cause a known issue. As a workaround, remove the Markdown Navigator from the plugin directory and restart CLion.
  • There are lots of improvements coming from the IntelliJ Platform, like smooth mouse scrolling, a timeline for GitHub pull requests, reworked Clone dialog, and many fixes to the JetBrains Runtime. Read about these changes in the IntelliJ IDEA blog.

That’s it for now! Give this build a try and stay tuned for further fixes and improvements!

DOWNLOAD CLION 2019.3 EAP

Your CLion Team

JetBrains
The Drive to Develop

Comments below can no longer be edited.

79 Responses to CLion Starts 2019.3 EAP: Performance Improvements, Clangd-based Code Completion & Remote Debug via gdbserver

  1. Paul Belanger says:

    September 18, 2019

    This is great news! Most of my issues related to Clion are due to UI freezes and code completion. Thank you for focusing on performance!

  2. Anton says:

    September 18, 2019

    Thank you for the new release guys, although, it seems there is something wrong. I can’t open a single project anymore. If I click on the project name in then project list window, nothing happens. If I click the “Open” button, CLion can’t even show directory contents. The spinning circle spins forever. Is it only me or somebody else has the same issue?

    • Anastasia Kazakova says:

      September 18, 2019

      Looking into it. We might require additional info, so please follow the issue https://youtrack.jetbrains.com/issue/CPP-17423

    • Anastasia Kazakova says:

      September 18, 2019

      Can you please attach idea.log to the ticket?

  3. Roman Popov says:

    September 18, 2019

    I can’t open project too https://youtrack.jetbrains.com/issue/CPP-17423

    • Anastasia Kazakova says:

      September 18, 2019

      Looking into it. Follow the update in the ticket.

      • Roman Popov says:

        September 18, 2019

        Can’t reply on tracker “”The application is currently in read-only mode. Please try again later.”
        But yes, it was markdown plugin. Thanks for quick help!

        • Anastasia Kazakova says:

          September 18, 2019

          Thanks for letting us know and sorry for the inconvenience.

          Markdown Navigator is a 3rd party plugin, and we recommend using JetBrains plugin for Markdown which is now bundled, exactly since 2019.3 (and this actually caused this issue, unfortunately).

  4. Anton says:

    September 18, 2019

    Thank you, it solved the issue for me. I wasn’t able to reply on the issue tracker too.

    • Anastasia Kazakova says:

      September 18, 2019

      Thanks!

  5. Tano says:

    September 19, 2019

    Great news, although I think that the “Settings/Preferences | Editor | General | Refactorings ‘Enable in-place mode’” should be OFF by default, it’s really slow.
    Now it’s blazing fast 🙂

    • Anastasia Kazakova says:

      September 19, 2019

      We’ll consider that. Actually, in-place Rename is a very useful thing, however indeed, for now, has some performance issues. If we don’t manage to fix the in-place mode as well, we might consider having it off by default. Thanks

  6. Lilian says:

    September 19, 2019

    Thank you for proper GDB remote debugging!!
    Have to test it yet.
    Side note: the completion window does not open pretty often(crashes) – my guess is that your tracker is filled with this issue, so I abstain from reporting it.

    • Anastasia Kazakova says:

      September 19, 2019

      We are unaware of the issue, so idea.log and a ticket in tracker would be really helpful. Do you have Clangd completion on (as it is by default)?

      • Artur Troian says:

        November 13, 2019

        Is there a way to specify application arguments when running gdb remote? For example app –param1 val –param2 val ?
        Couldn’t find such option

        • Vasily Romanikhin says:

          November 14, 2019

          I suppose you can customize GDB Server Args: in similar way:
          :1234 /tmp/CLion/debug/app --the_arg

  7. Ernst says:

    September 19, 2019

    it doesn’t look that is a performance progress
    loading cmake project took ~ 15 mins,
    updating index – ~ 5-7 mins.
    find the declaration – ~1min
    previously it was similar

    • Ernst says:

      September 19, 2019

      like a previuosly – writing e.g. a member declaration and wait 5-10 seconds while this will be really painted in the editor ((

      • Anastasia Kazakova says:

        September 19, 2019

        Do you have the Clangd engine turned on or off (can check in Settings)?

        • Ernst says:

          September 19, 2019

          yes, and it takes 80-90% of CPU capacity , constantly.
          by the way – just tested “find declaration” under cursor in loaded and indexed project – ~2m23sec

          • Ernst says:

            September 19, 2019

            sorry, I’m wrong CPU load 88% – is a clion itself, not clangd

    • Anastasia Kazakova says:

      September 19, 2019

      There are particular areas that were improved, depending on the project and OS characteristics as well. Maybe you can submit some CPU snapshots for the cases you’ve mentioned? We are very interested in the investigation.

      • Ernst says:

        September 19, 2019

        please drop the link on a manual “how to” do this in clion?

        • Anastasia Kazakova says:

          September 19, 2019

          Sure, here you are: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems
          We need a CPU snapshot captured at the moment you reproduce the issue with the lagging action. Then attach the rescription of what you did and submit a request to our tracker. Thank you in advance.

          • Ernst says:

            September 24, 2019

            I see my instance of clion sends a tens of freeze reports daily, so I think my manual reports are not required.
            thank you

            • Anastasia Kazakova says:

              September 24, 2019

              Ok, if you submit them to the system, then indeed we’ll take a look. However, it might be easier to investigate an issue if we know that that’s your setup and request some additional info. Do you know some submissions numbers for your submitted reports?

          • Ernst says:

            September 24, 2019

            I haven’t seen request numbers. I just see the freeze happens every few minutes and click submit issue with a number of attached files (1-10 ones)
            I could submit a reports using CPU snapshot, slow startup, slow indexing. but could you confirm (sorry , I haven’t time to check this by myself) that snapshot doesn’t contain sensitive info about the project , like variables, files, classes names etc?

            • Anastasia Kazakova says:

              September 24, 2019

              Thread dumps are enough if we are talking about the freezes.
              CPU snapshot is necessary if the UI doesn’t freeze but lags are happening. CPU snapshot might contain information about custom plugins installed, but not about the things you’ve mentioned.

          • Ernst says:

            September 24, 2019

            … as well as network info like host, domain, IPs etc?

            • Anastasia Kazakova says:

              September 24, 2019

              IPs shouldn’t be there as well, host – not sure, might be, need to check that probably.

          • Ernst says:

            September 24, 2019

            this is an example of last submission:
            https://ea.jetbrains.com/browser/ea_reports/5233178
            also most of the plugins has been switched off

          • Ernst says:

            September 24, 2019

            various cases, sometimes this is related with syncing the sources with remote host,
            sometimes with git operations
            but most often case is an editing , e.g.: strl+y, deleting the line, or type new one.

            when clion will submit next report , I’ll keep this in mind and describe this here with details

            • Anastasia Kazakova says:

              September 24, 2019

              Thanks! That will be helpful.

    • Anastasia Kazakova says:

      September 19, 2019

      Regarding the CMake project loading, how long does it take for CMake to run on your project w/o CLion? Do you have many build configurations in CLion or just some basic Debug/Release?

    • Roman says:

      September 19, 2019

      I had similar experience in past. But then I’ve found “Mark directory as -> Excluded”. There are dozens of libraries and executables in project I don’t care about, after I’ve excluded all of them, Clion performance improved significantly.

      • Anastasia Kazakova says:

        September 19, 2019

        Yes, this is a good workaround actually.
        CPU snapshot however helps anyway to see if there are some bug, nonoptimal algorithms, etc.

  8. Sebastian says:

    September 20, 2019

    Any news about new project model support such as meson, autotools etc.?

  9. xiamiaoren says:

    September 20, 2019

    Do you have plan to move compute-sensitive tasks to server and remain others run on PC? This method can let CLion has more computing power and reduce the UI freeze time with better user experience.

    • Anastasia Kazakova says:

      September 20, 2019

      We don’t have such plans for now. IntelliJ Platform architecture doesn’t assume such flow and it requires significant changes. Also, there might be networking delays and other things you have to deal in such configurations.

  10. mbalabin says:

    September 20, 2019

    It seems that Python support disappeared after installation of this EAP. I do not see Python among installed or available plugins. Also, all Python-related settings disappeared from Settings dialog.

  11. Roman says:

    September 20, 2019

    Don’t like that you moved “Copy Relative Path” / “Copy Absolute Path” to “Copy Reference..”. They were part of my regular workflow, and now life becomes little harder. Is there an option to restore old menu?

    • Anastasia Kazakova says:

      September 20, 2019

      I’m afraid no. Feel free to leave your feedback in the request in https://youtrack.jetbrains.com/issues/IDEA tracker.

    • Taw says:

      September 24, 2019

      Totally agree, sometimes I think that for 3 nice things added, one good should be removed/modified, some kind of sacrifice to the devil.
      What does Copy Reference really mean? Copy absolute path was really clear…

  12. Roman says:

    September 20, 2019

    Also noticed that sometime some header files in Project view have “C/C++” Icon. But after sometime go back to normal. Looks like this happen during build. Is this a known bug?

    • Anastasia Kazakova says:

      September 20, 2019

      Never noticed that before. Could you please capture a video or a few screenshots and report a bug?

    • Oliver Stöneberg says:

      September 23, 2019

      Something related I encountered a while ago – https://youtrack.jetbrains.com/issue/CPP-14233

  13. Oliver Stöneberg says:

    September 23, 2019

    Something related I encountered a while ago – https://youtrack.jetbrains.com/issue/CPP-14233

    • Anastasia Kazakova says:

      September 23, 2019

      Thanks a lot for sharing!

  14. Roger Araújo says:

    September 23, 2019

    I have been using CLion 2019.3 EAP for a few days now, and I can attest it offers a significantly better experience than 2019.2.2 for my projects. While there are occasional CPU spikes, UI lags are shorter and less frequent, and general usage just feels smoother overall. The decision to focus on quality rather than new features for this version was very wise indeed! Keep up the good work, you’re building an excellent product.

    • Anastasia Kazakova says:

      September 23, 2019

      Thank you! It’s really important to see that our efforts brought some visible result to our users!

    • Linus Tan says:

      September 26, 2019

      I’d just like to say that I’m also seeing much smoother performance when editing code with CLion 2019.3 EAP, particularly when working with the Eigen library which makes heavy use of templates. In 2019.2 the IDE would freeze for 3-4 seconds every couple of minutes, which was making it quite unusable. With the EAP, these freezes are gone.

      Thanks again for focusing on performance over adding new features!

      • Anastasia Kazakova says:

        September 26, 2019

        Thank you for your feedback! Much appreciated

  15. Karl-Heinz Reng says:

    September 28, 2019

    Asking for Intel C++ Compiler support? Do you plan to support this toolchain someday?

    • Anastasia Kazakova says:

      September 29, 2019

      You can use it in CLion. We don’t support it officially, as we don’t test with it. But in general, you can use it w/o a problem. Maybe some small glitches in case of Windows-specific extensions usage are possible, but overall should be good.

  16. Mike Slembrouck says:

    October 10, 2019

    All previous CLion releases where unusable in our company due to poor performance.

    The 2019.3 EAP update – 3th of october is however clearly a huge improvement.

    This is the first time my MacBook remains silent while developing…. No high CPU usage, no fans going crazy… What a great experience. Let’s hope it stays like this in future versions.

    Regards,

    • Anastasia Kazakova says:

      October 10, 2019

      Thanks for your feedback!

      • Mike Slembrouck says:

        November 5, 2019

        Just wanted to let you know that in the meantime we had a couple of new EAP updates since the very promising version around the 3th of october. Unfortunately the performance has downgraded again. Several developers reported that Clion-EAP is consuming between 100% 200% CPU for very long periods again.

        We are looking forward to the next EAP update.

        • Anastasia Kazakova says:

          November 5, 2019

          Would be good if you can provide CPU snapshots from the EAP builds where the problems occur.

          • Mike Slembrouck says:

            November 14, 2019

            I understand, but I would need to make several snapshots of several performance issues. High cpu usage, UI freezes/lag on many straightforward situations like swapping header/source, code surfing and so on. It’s just too time consuming… I wanted to re-evaluate the EAP of 3 oktober to see the performance issues re-appeared in later EAP versions, however CLion tells this version is now expired so I cannot use the old version anymore. It’s a pity, I even bought extra licences after the EAP of 3 oktober because it was so promising. Unfortunately today, I seems we are again back to square one.

            • Anastasia Kazakova says:

              November 14, 2019

              We don’t see any significant degradation in our performance tests. Let’s start with thread dumps for UI freezes or CPU snapshots for some particular cases bothering you the most.

  17. Ernst says:

    October 11, 2019

    this week , I’ve switched clangd off , that’s perfect!
    the performance is now much much better , no UI freezes so much (1-2 per day only),
    and no wrong error highlights in the code

    please don’t remove off and continue work on your own lang engine!

    • Anastasia Kazakova says:

      October 11, 2019

      I actually doubt clangd can cause UI freezes as it’s a separate process running. And also would be nice to learn about the wrong highlighting in case of clangd. You’ve probably reported the issues already, can you please remind us the ticket numbers? I can’t find anything related by the reporter’s name.

      • Ernst says:

        October 14, 2019

        there was no a ticket number just a discussion here https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006006820-clion-clangd-shows-wrong-error-with-ostream

        • Anastasia Kazakova says:

          October 14, 2019

          Thanks for the link. We’ll take another look.

      • Ernst says:

        October 14, 2019

        I’m ready to assist with a collecting the logs/conditions to reproduce.
        regarding freezes – probably this not related , we just can look into my account for error submissions and compare the number of the submissions per weeks . I rely on that info only.

        • Vasily Romanikhin says:

          October 14, 2019

          Can we contact you via email? I hope you can help us to reproduce the issue with clangd (highlighting and code-assistant) in remote-mode.

          • Ernst says:

            October 15, 2019

            yes, sure thing.
            feel free to get the address from my jetbrains account.that’s actual

  18. Van Dude says:

    October 15, 2019

    Awesome stuff. The performance improvements are highly appreciated!

    question: are there any plans to integrate/support AVR/SAM in the future? We are currently using Atmel Studio for our projects but would really like to switch to CLion because your platform works so much better (also for python and java)

    thanks

    • Anastasia Kazakova says:

      October 15, 2019

      Thank you. Regarding AVR/SAM, please, create a request in our tracker https://youtrack.jetbrains.com/issues/CPP and describe the case, we’ll definitely consider it among others.

  19. Ernst says:

    February 14, 2020

    I’ve tried to use remote gdb server,
    it works incorrectly for me , could you correct where I’m wrong :

    1. Target: pre-configured other target (checked that is compiling successfully and remotely )
    2. Executable: Not selected or any – I don’t need to copy because build process is fully remote.
    3. Credentials: correct server and credentials (actually I don’t understand why it can’t be retrieved from Target from point#1
    4. Update – none (the same reason as #2)
    5. upload path – any (due of 2 and 4 points)
    6. target remote: server from #3 and gdb port
    7. GDB server: remote path to gdb (here, I also don’t understand why you didn’t add remote file selection as in many other points of CLion)
    8. GDB server args: tcp:

    all it starts correctly , by clion doesn’t attach to remote process – breakpoint in .so file which is loaded by doesn’t stop the execution

    • Ernst says:

      February 14, 2020

      for sure – cmake-project is an only wrapper for custom targets (scons-based)

    • Ernst says:

      February 14, 2020

      seems a few parameters were hidden by the site, hope you can somehow retrieve those

    • Vasily Romanikhin says:

      February 17, 2020

      I suppose the problem with #2.
      If you build your application remotely, it’s better to use GDB Remote Debug run-configuration. Because it’s not required build step, doesn’t upload upload anything to remote host, but it requires to run gdbserver manually (https://www.jetbrains.com/help/clion/remote-debug.html#).

      • Ernst says:

        February 21, 2020

        yes, I see, thank you
        I was using GDB Remote debug all the time, but hoped that Remote GDB Server allows me do not manually call the build and manually start remote gdbserver….

Subscribe

Subscribe for updates