[Qt-creator] clangd parsing time
aclight at gmail.com
Wed Dec 1 17:58:13 CET 2021
On Wed, Dec 1, 2021 at 8:32 AM Adam Light <aclight at gmail.com> wrote:
> On Wed, Dec 1, 2021 at 1:59 AM Eike Ziller <Eike.Ziller at qt.io> wrote:
>> I have got a fix for macOS (in LLVM), and a similar patch that _might_
>> improve things on Windows too
>> but since we fail to reproduce the huge difference between "compiling"
>> and "clangd indexing" that you observe in the first place, we have a
>> difficult time verifying that this indeed helps.
>> We have created a build of clangd with the potential fix and I've
>> uploaded it here:
>> it would be great if you could test if this improves things for you. Set
>> the path to the new clangd in Tools > Options > C++ > Clangd > Path to
> I gave that a try, and after deleting my build directory it still took a
> very long time for clangd to completely parse my project. Today it took 2
> hours 44 minutes. Previously, with the clangd.exe that shipped with QtC
> 6.0.0-beta1, it took 3 hours 54 minutes. So today's run was substantially
> faster, but still orders of magnitude greater than the ~2 minutes it takes
> to fully build the same project on the same machine.
I should have mentioned that the project itself has changed between these
two tests, primarily in that I have removed about 50 directories from the
qmake INCLUDEPATH variable. This change reduced compile time (~150 seconds
down to ~120 seconds) and reduced the duration of the "Parsing C/C++ Files"
step in Creator (I did not attempt to accurately measure this time). So it
would not be surprising if it also reduced the clangd.exe parsing time.
Also, I looked at the Priority in task manager for the clangd.exe process
(this is with the latest test build) and the priority is set as 8 during
parsing and after parsing is completed. According to the Windows docs
priority 8 is normal.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator