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

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

This entry was posted in Announcement, Early Access Preview and tagged , , , , , , . Bookmark the permalink.

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

  1. Paul Belanger says:

    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:

    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:

      Looking into it. Follow the update in the ticket.

      • Roman Popov says:

        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:

          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).

  3. Anton says:

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

  4. Tano says:

    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:

      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

  5. Lilian says:

    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:

      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)?

  6. Ernst says:

    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

  7. Sebastian says:

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

  8. xiamiaoren says:

    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:

      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.

  9. mbalabin says:

    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.

  10. Roman says:

    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?

  11. Roman says:

    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?

  12. Oliver Stöneberg says:

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

  13. Roger Araújo says:

    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:

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

    • Linus Tan says:

      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!

  14. Karl-Heinz Reng says:

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

    • Anastasia Kazakova says:

      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.

  15. 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,

  16. Ernst says:

    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:

      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.

Leave a Reply

Your email address will not be published. Required fields are marked *