[Qt-creator] clangd parsing time
aclight at gmail.com
Mon Nov 8 19:57:15 CET 2021
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
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 (
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.
PS: As I am about to send this, it's been 26 minutes since parsing started,
and it's finished only 375 files.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator