diff options
| author | bors <bors@rust-lang.org> | 2023-12-19 09:31:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-19 09:31:34 +0000 |
| commit | 831d0e01b342908516ce225124a45e196d056696 (patch) | |
| tree | bc69f7f50c2d4b71101779877194d3cbfb65acc1 /editors/code | |
| parent | 37b00196add53a1b1b5e02f77ff98274cbe66eff (diff) | |
| parent | f587b543409142c1fa4bdcdfb29328b8958e72d0 (diff) | |
| download | rust-831d0e01b342908516ce225124a45e196d056696.tar.gz rust-831d0e01b342908516ce225124a45e196d056696.zip | |
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-: https://github.com/rust-lang/rust/pull/119108
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/src/debug.ts | 6 |
1 files 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; |
