Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 4.12.0-beta1
-
None
-
Debian testing amd64, i7-7700k CPU, 32 Gb RAM
Description
Clang Code Model is very slow on relatively big projects right now. A simple test can demonstrate this:
- git clone https://github.com/pokerth/pokerth.git
- git checkout stable
- Open the project in Qt Creator
- Navigate to pokerth_game/Sources/src/gui/qt/gametable/gametableimpl.cpp
- Scroll to line 2590 that says
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() == currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
- Place the cursor after (*it_c)-> and press Ctrl+Space to trigger completion.
- 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