Slowness of kdev-clang for some projects

David Nolden david.nolden.kdevelop at art-master.de
Tue Oct 4 22:21:11 UTC 2016


Hi Sven,

for my work project, it's also extremely slow, but it also depends on
the file I have open. Maybe it's just related to the amount of parsing
done in headers. I think the time is spent within clang.

I think an important avenue forwards would be to modify clang such
that you can tell it to completely ignore function bodies while
parsing headers, just like oldcpp did when only
"VisibleDeclarationsAndContexts" was requested.

Alternatively, modified source files with all function bodies cut out
could be fed into clang for those headers which are up-to-date.

Greetings, David

2016-10-05 0:01 GMT+02:00 Sven Brauch <mail at svenbrauch.de>:
> Hi,
>
> For some projects, kdev-clang is really, really slow. That affects both
> the background parsing, as well as the code completion. Example of an
> affected user:
> https://forum.kde.org/viewtopic.php?f=218&t=136457&p=365183#p364915
> He says code completion takes 2-3 seconds to show up, and I have the
> same issue on my work project. It's really related to the project; in a
> different (even if much larger) project, completion speed is ok-ish (at
> least under half a second) on the same machine(s). I tried this on
> multiple computers / setups, it seems to be quite persistently
> reproducible. I have also met users on reddit and IRC which have the
> same issue, while others are perfectly happy.
>
> Unfortunately I have pretty much no idea where to start looking for this
> issue. Do you kdev-clang people have any immediate ideas what could
> cause this? The project I can reproduce it on is not public, but I can
> send you a tar if you want to look for yourself.
>
> I already pinged milian once on IRC about this, we did some poking
> around with the PCH cache, but the cache seems to be used just fine for
> the slow project.
>
> Best,
> Sven
>
>


More information about the KDevelop-devel mailing list