Skip to content
Commit e25a08de authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

semantic highlighter: Use a timer to reduce amount of requests being sent



Currently we are sending requests on every typed character and everytime
we change view. This can be really heavy on the server, especially with
large documents. It results in problems such as "incorrect highlighting"
because server isn't in sync with the latest changes in the document.

This change introduces a simple mechanism to fix this: Use a QTimer to
reduce the amount of requests. Every time we type or change the current
KTE::View this timer gets started/restarted and when it times out, it
just refreshes the highlighting.

This means no more highlight-as-you-type, which is both good and bad but
since we can't really control the servers, I think this is better.

Signed-off-by: default avatarWaqar Ahmed <waqar.17a@gmail.com>
(cherry picked from commit 1c5dc7c8)
parent 80e1d658
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment