Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt Creator 4.8.1
-
None
-
Kubuntu
Description
How to reproduce:
- Open a C++ file
- Press Ctrl+S (Save action)
What happens:
QtCreator's GUI interface freezes for about half a minute, maybe slightly less.
I have run QtCreator with clang debugging output (export QT_LOGGING_RULES=qtc.clang*=true export LIBCLANG_TIMING=1) - you can find its output here.
Strings like qtc.clangbackend.timers: ParseSupportiveTranslationUnitJob needed 10747 ms look suspicious.
Here you can find perf top output. And here are some interesting function from the perf top log:
- libClangFormat.so
- clang::SourceManager::getDecomposedLoc
- clang::SourceManager::isBeforeInTranslationUnit
- clang::format::FormatTokenLexer::getNextToken
PS. Note that I DO use extensively clang-format as a part of the Beautifier plugin (I assign a shortcut to the action and invoke it manually before saving) and I do NOT have any problems (like hangs) and the code is formatted very quickly.