Performance improvements due to not debouncing some function calls.

Adjust JSX and TS syntax definitions.
This commit is contained in:
Martín Lucas Golini
2025-04-02 20:24:45 -03:00
parent 577f2e3dbb
commit 2a88bac8a1
7 changed files with 68 additions and 67 deletions

View File

@@ -195,8 +195,8 @@ void LSPDocumentClient::requestSemanticHighlightingDelayed( bool reqFull ) {
if ( sceneNode ) {
mWaitingSemanticTokensResponse = true;
sceneNode->removeActionsByTag( mTagSemanticTokens );
sceneNode->runOnMainThread( [this, reqFull]() { requestSemanticHighlighting( reqFull ); },
Seconds( 0.5f ), mTagSemanticTokens );
sceneNode->debounce( [this, reqFull]() { requestSemanticHighlighting( reqFull ); },
Seconds( 0.5f ), mTagSemanticTokens );
}
}
@@ -451,7 +451,7 @@ void LSPDocumentClient::requestSymbolsDelayed() {
LSPDocumentClient* docClient = this;
URI uri = mDoc->getURI();
LSPClientServer* server = mServer;
sceneNode->runOnMainThread(
sceneNode->debounce(
[docClient, server, uri]() {
if ( server->hasDocument( uri ) )
docClient->requestSymbols();