Why is "Show uses" sometimes so slow?

Alexandre Courbot gnurou at gmail.com
Tue May 29 08:18:26 UTC 2012


> It already is all stored to disk, also the information for uses. But it also
> needs to be loaded from disk again (at least to a certain extent) when
> showing the uses-info etc. Since this is probably not very little data, you
> end up with a bigger memory-footprint.

Actually what I see is that the disk space taken by ~/.kdeduchain
grows when I do such costly uses lookup (took ~20MB and 5 minutes of
background parser when looking for uses of a commonly used kernel
function). Also, I closed KDevelop, starting it again and did the same
lookup and the second time was almost instant. So probably all
information is not computed during the first background parser pass.

The memory usage after my change was surprising considering unused
DUChains are supposedly stored on disk - but I did a pretty random and
uninformed change to the code, so I will not draw any conclusion from
this.

> PS: I'm not saying there's no way to improve the situation you see, since I
> didn't do any kind of performance measuring on those parts ever, but I do
> know that Milian did spend quite some time on such things so it at least not
> very easy to find areas to improve.

This part of the code looks fun actually. I just wonder what happens
when the "Show Uses" progress bar is advancing. Milian, would there be
some documentation somewhere that I failed to see to let me start
faster on this?

Alex.




More information about the KDevelop-devel mailing list