Skip to content

Commit 831d0e0

Browse files
committed
Auto merge of #16162 - sanjaiyan-dev:sanjaiyan-async-concurrent, r=lnicola
minor: Optimizing Performance with `Promise.all` 🏎 Hello, This pull request introduces a modest performance improvement by executing asynchronous tasks using `Promise.all`, thereby enhancing the efficient utilization of hardware resources. Thank you for considering this enhancement. Ref-: rust-lang/rust#119108
2 parents 37b0019 + f587b54 commit 831d0e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

editors/code/src/debug.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ async function getDebugConfiguration(
135135
let sourceFileMap = debugOptions.sourceFileMap;
136136
if (sourceFileMap === "auto") {
137137
// let's try to use the default toolchain
138-
const commitHash = await getRustcId(wsFolder);
139-
const sysroot = await getSysroot(wsFolder);
138+
const [commitHash, sysroot] = await Promise.all([
139+
getRustcId(wsFolder),
140+
getSysroot(wsFolder),
141+
]);
140142
const rustlib = path.normalize(sysroot + "/lib/rustlib/src/rust");
141143
sourceFileMap = {};
142144
sourceFileMap[`/rustc/${commitHash}/`] = rustlib;

0 commit comments

Comments
 (0)