From f587b543409142c1fa4bdcdfb29328b8958e72d0 Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Tue, 19 Dec 2023 13:16:55 +0530 Subject: [PATCH] perf: Run async task in concurrent --- editors/code/src/debug.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts index 06034e16480..d9c6b6ac456 100644 --- a/editors/code/src/debug.ts +++ b/editors/code/src/debug.ts @@ -135,8 +135,10 @@ async function getDebugConfiguration( let sourceFileMap = debugOptions.sourceFileMap; if (sourceFileMap === "auto") { // let's try to use the default toolchain - const commitHash = await getRustcId(wsFolder); - const sysroot = await getSysroot(wsFolder); + const [commitHash, sysroot] = await Promise.all([ + getRustcId(wsFolder), + getSysroot(wsFolder), + ]); const rustlib = path.normalize(sysroot + "/lib/rustlib/src/rust"); sourceFileMap = {}; sourceFileMap[`/rustc/${commitHash}/`] = rustlib;