mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-16 14:05:07 +03:00
Fix slowdown due to locking the main thread when sending text buffer changes to the LSP.
This commit is contained in:
@@ -70,8 +70,7 @@ void LSPDocumentClient::onDocumentTextChanged( const DocumentContentChange& chan
|
||||
++mVersion;
|
||||
// If several change event are being fired, the thread pool can't guaranteed that it will be
|
||||
// executed in FIFO. Se we accumulate the events in a queue and fire them in correct order.
|
||||
mServer->queueDidChange( mDoc->getURI(), mVersion, "", { change } );
|
||||
mServer->getThreadPool()->run( [this, change]() { mServer->processDidChangeQueue(); } );
|
||||
mServer->queueAndProcess( mDoc->getURI(), mVersion, { change } );
|
||||
requestSymbolsDelayed();
|
||||
requestSemanticHighlightingDelayed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user