mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
add configuration for STS parallel message processing (#19279)
* add configuration for parallel processing * update setting description * vbump sts * enable feature for dev by default
This commit is contained in:
@@ -8,7 +8,7 @@ import { ServerOptions, TransportKind } from 'vscode-languageclient';
|
||||
import * as Constants from './constants';
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import { getCommonLaunchArgsAndCleanupOldLogFiles, getOrDownloadServer } from './utils';
|
||||
import { getCommonLaunchArgsAndCleanupOldLogFiles, getOrDownloadServer, getParallelMessageProcessingConfig } from './utils';
|
||||
import { Telemetry, LanguageClientErrorHandler } from './telemetry';
|
||||
import { SqlOpsDataClient, ClientOptions } from 'dataprotocol-client';
|
||||
import { TelemetryFeature, AgentServicesFeature, SerializationFeature, AccountFeature, SqlAssessmentServicesFeature, ProfilerFeature, TableDesignerFeature, ExecutionPlanServiceFeature } from './features';
|
||||
@@ -45,7 +45,7 @@ export class SqlToolsServer {
|
||||
const serverPath = await this.download(context);
|
||||
this.installDirectory = path.dirname(serverPath);
|
||||
const installationComplete = Date.now();
|
||||
let serverOptions = generateServerOptions(context.extensionContext.logPath, serverPath);
|
||||
let serverOptions = await generateServerOptions(context.extensionContext.logPath, serverPath);
|
||||
let clientOptions = getClientOptions(context);
|
||||
this.client = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions);
|
||||
const processStart = Date.now();
|
||||
@@ -104,8 +104,12 @@ export class SqlToolsServer {
|
||||
}
|
||||
}
|
||||
|
||||
function generateServerOptions(logPath: string, executablePath: string): ServerOptions {
|
||||
async function generateServerOptions(logPath: string, executablePath: string): Promise<ServerOptions> {
|
||||
const launchArgs = getCommonLaunchArgsAndCleanupOldLogFiles(logPath, 'sqltools.log', executablePath);
|
||||
const enableAsyncMessageProcessing = await getParallelMessageProcessingConfig();
|
||||
if (enableAsyncMessageProcessing) {
|
||||
launchArgs.push('--parallel-message-processing');
|
||||
}
|
||||
return { command: executablePath, args: launchArgs, transport: TransportKind.stdio };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user