Why is there one completion thread per completion model?

Milian Wolff mail at milianw.de
Mon Sep 27 13:36:46 UTC 2010


On Monday, 27. September 2010 15:17:00 Esben Mose Hansen wrote:
> On Monday 27 September 2010 14:00:03 Milian Wolff wrote:
> > Couldn't it be one thread for all? Or is this too complicated and having
> > lots  of threads no issue?
> 
> One issue is obviously big backtraces :)

Yeah, it's annoying but not yet annoying enough for me to start hacking at it.

Actually, I just remembered one case where this is actually useful:

Imagine multiple languages in one file (my multilang branch), theoretically you 
could have multiple "valid" models at one point and want to see all of their 
items. In order for those models to do their stuff at the same time, one thread 
per language is required.

So we should probably leave it as is.

> Threads in itself causes very little overhead; however if each thread
> checks something at each keystroke it certainly adds up.

The model only calls completionsNeeded when required.

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100927/75e40e16/attachment.sig>


More information about the KDevelop-devel mailing list