Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23467

Clang Code Model takes 13 seconds to show suggestions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 4.12.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Debian testing amd64, i7-7700k CPU, 32 Gb RAM
    • Linux/X11

    Description

      Clang Code Model is very slow on relatively big projects right now. A simple test can demonstrate this:

      1. git clone https://github.com/pokerth/pokerth.git
      2. git checkout stable
      3. Open the project in Qt Creator
      4. Navigate to pokerth_game/Sources/src/gui/qt/gametable/gametableimpl.cpp
      5. Scroll to line 2590 that says 
        if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
      1. Place the cursor after (*it_c)-> and press Ctrl+Space to trigger completion.
      2. It takes about 15 seconds on my machine (i7-7700k 4.6 GHz CPU) to appear.

      This line causes problems for the built-in code model so when I turn off the Clang one completion stops working for this iterator (it works fine and very fast in other places though). But CCM is slow everywhere in this file.

      I logged the timings and this seems to be the biggest offender:

      qtc.clangbackend.timers: UpdateExtraAnnotationsJobRunner needed 15193 ms

      After the parsing the completion is fast until I change anything in the file, after that it needs another 15 seconds to reparse which renders this plugin unusable for me. Tested on the official Qt Creator snapshot build from https://download.qt.io/snapshots/qtcreator/4.12/4.12.0-beta1/225/qt-creator-opensource-linux-x86_64-4.12.0-beta1_225.run

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kosjar Nikolai Kosjar
            rkfg rkfg
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes