Using DUChain from the main thread

Hamish Rodda rodda at kde.org
Wed Oct 31 20:32:25 UTC 2007


On Thu, 1 Nov 2007 01:22:44 am David Nolden wrote:
> On Wednesday 31 October 2007 13:32:39 Hamish Rodda wrote:
> > Speaking of blocking the main thread, is the code completion stuff still
> > done in the main thread?  If so, I'm tempted to move it out...
>
> I think most stuff is done in the main thread currently, yes. But he
> slowest processing happens within kate I think, although I think I've
> already speeded that up by not sorting by name(too slow for very long
> lists).

Oh, really? The lists must get _very_ long...

> > I thought about it more, and you're right, this is a good way to go. 
> > It's easier to write bug-free code compared to playing with bare
> > pointers.  My main concern was having to duplicate the displayed parts of
> > the duchain whenever you want to provide it as a model, but I've realised
> > that this has to be done anyway.
> >
> > (BTW, why does the DUChainBase object set m_base, even though it already
> > passes the pointer to itself in the constructor?)
>
> I have no time to look into that at this moment.
>
> Just by the way, since our DU-Chains might get very big, wouldn't it be
> best to build the class-view tree on demand? It could only know about the
> items currently visible, and it would only need to react on changes of
> currently visible items, and it would not need to hold a structural copy of
> the whole du-chain. It could read new data from the du-chain in the moment
> the user expands an item.

This is already the case.  There must be a major stuffup in my code for the 
performance to suck so much.  I'm sure I'll find it :)

> Since the list of visible items is limited, it could hold a
> map "DUChainPointer -> QPersistentModelIndex" for all visible items, which
> would allow efficient and simple updating.

I'll have a look at this suggestion too.

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20071101/a369c1cd/attachment.sig>


More information about the KDevelop-devel mailing list