D12298: Group completion requests and only handle the last one
noreply at phabricator.kde.org
Tue Apr 17 22:23:01 UTC 2018
mwolff created this revision.
Restricted Application added a subscriber: kdevelop-devel.
mwolff requested review of this revision.
I noticed that we sometimes wait quite long on code completion
requests, especially when editing header files. The edit operation
in a header invalidates the preamble, so reparsing will always take
quite some time. Nothing we can do about that, really. But at least
we can make sure we don't do work for naught:
The old code just emitted signals whenever code completion is invoked.
This can happen multiple times while we are editing the header. Since
the computation takes time, the subsequent completion requests pile
up and will all be handled eventually. If you are then impatient and
go to a different file, we will still go through all requests even
though they are not interesting anymore.
This patch groups the completion requests together with a simple
timer to ensure we only handle the last request once the current
completion job has finished.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel