[Qt-creator] clangd parsing time

Björn Schäpers qt-maillist at hazardy.de
Mon Nov 8 21:58:16 CET 2021

Am 08.11.2021 um 19:57 schrieb Adam Light:
> Hi
> I'm using QtC 6.0.0-beta2 on Windows 10.
> I wanted to give clang a try so I enabled the "Use clangd" option. I have 
> Enabled background indexing checked, worker thread count set to Automatic, and 
> Document update threshold set to 500ms.
> I deleted all of the build directories for my project and then opened the 
> project in Creator. After a few seconds a "Parsing C/C++ files (clangd)" popup 
> appeared with a progress bar and file count. It shows that it needs to parse 
> 3495 files.
> After having run for 15 minutes now, the popup says that 216 files have been 
> parsed.
> Building a debug build of this qmake-based project on this Windows machine 
> takes about 2 minutes. That is using the MSVC compiler, not clang. The machine 
> has a 16 core/32 thread processor and 32GB RAM. Building the same project on 
> an older Macintosh machine with 4 cores/8 threads takes about 5-6 minutes. In 
> that case clang is the compiler.
> I collected some ETW traces and I verified that clangd is running in 16 
> threads. Unfortunately, the debug symbols for Creator 
> (https://download.qt.io/development_releases/qtcreator/6.0/6.0.0-beta2/installer_source/windows_x64/qtcreator-debug.7z) 
> do not include symbols for clangd, so I have no idea what the bottleneck is.
> I realize that clangd is considered experimental, but surely it's not this 
> slow for others, right? If this isn't expected, I'm open to helping to debug 
> what's going on, if someone has ideas about how to do so.
> Thanks
> Adam
> PS: As I am about to send this, it's been 26 minutes since parsing started, 
> and it's finished only 375 files.

that I can't confirm. I had it working on LLVM and it proceeds in a "normal" 
speed, I had stopped clangd and switched back, because I haven't that much space 
left and the cache was eating it.
HEAD LLVM (clangd) and QtCreator.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20211108/94923f4c/attachment.html>

More information about the Qt-creator mailing list