KDevelop 5 too slow?

René J.V. Bertin rjvbertin at gmail.com
Tue May 30 15:23:55 BST 2017

On Tuesday May 30 2017 15:18:51 Milian Wolff wrote:

>- user is typing, waits too long, and we kick of a parse job, the user 
>continues to type -> this case is, afaik, currently unhandled. we should abort 
>the parse job in such cases, if at all possible. But looking at clang's 

Yes. I've tried to implement the simplest possible approach to achieve this for unknown declaration problems (got downvoted because it uses a nested event loop but it does make things bearable for me).
Even if you can't abort the parse job (properly short of killing the thread?), can't you simply stop waiting for it to complete and ignore the results whenever they become available?

>- until the above is fixed, we'll have to reduce the 3s delay based on some 
>heuristics. i.e. we should probably return the default delay when

I have already found myself bumping those 500ms value significantly (to 2000). Maybe this is completely beside the point, but couldn't it be useful to make the timeout (the default 500ms value) adaptive (optionally or always) within a reasonable range of values? That is, increase the threshold if the timeout is triggered inappropriately too often, decrease again when waits become unnecessarily long. There are adaptive staircase methods (e.g. QUEST) from psycho-physics research that could probably be ... adapted to serve here if similar algorithms don't already exist in GUI  context.
A similar thing might be possible with the 3s delay

>-- the file is $small (whatever that means)
>-- the file is a .cpp file and we have parsed it before (reparsing is usually 
>quite fast in my experience)

Keep track of how long the last (full) parse took, per file, and use that information some way?

>-- the user entered a string after which he expects code completion to work, 
>like any of the following operators (and probably more): (,:<>.

Define a shortcut to trigger completion, some modifier combination with the Tab key by default? 

I probably wouldn't mind an option anyway to make completion manual because too often I find that it finds and selects a (or another) completion just when I hit the enter key (or even just after). I never really had that with other IDEs or completion mechanisms.


More information about the KDevelop mailing list