From 5385a42ec45df4f665ce821b3f499835086e7ac0 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 15 May 2024 18:58:57 -0400 Subject: [PATCH] perf(jsr): download metadata files as soon as possible and in parallel (#23836) * https://github.com/denoland/deno_graph/pull/471 * https://github.com/denoland/deno_graph/pull/473 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- tests/specs/install/future_install_local_deno/install.out | 2 ++ tests/specs/jsr/deps/main.out | 2 ++ tests/specs/jsr/deps/main_info.out | 2 ++ tests/specs/jsr/import_jsr_via_https/main.out | 2 ++ tests/specs/jsr/subset_type_graph/main.check.out | 2 ++ 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8997ca3d0..5440cb6fd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1470,9 +1470,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.75.1" +version = "0.75.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ca91da7bab6d6be790d408b7c9d6b420aa4514f7ff76ad76e523fce8a2fa9e" +checksum = "a68ddc87ce88c0a2568277ee6caabf37890128710910416c09cd6f6a8931dba6" dependencies = [ "anyhow", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 6829a29603..a929b8cbd1 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -69,7 +69,7 @@ deno_config = "=0.16.3" deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_doc = { version = "=0.135.0", features = ["html", "syntect"] } deno_emit = "=0.40.3" -deno_graph = { version = "=0.75.1", features = ["tokio_executor"] } +deno_graph = { version = "=0.75.2", features = ["tokio_executor"] } deno_lint = { version = "=0.58.4", features = ["docs"] } deno_lockfile.workspace = true deno_npm = "=0.20.1" diff --git a/tests/specs/install/future_install_local_deno/install.out b/tests/specs/install/future_install_local_deno/install.out index efb77d8f22..713507f029 100644 --- a/tests/specs/install/future_install_local_deno/install.out +++ b/tests/specs/install/future_install_local_deno/install.out @@ -1,4 +1,5 @@ ⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag. +[UNORDERED_START] Download http://localhost:4545/v1/extensionless Download http://localhost:4545/subdir/mod1.ts Download http://localhost:4545/subdir/subdir2/mod2.ts @@ -8,3 +9,4 @@ Download http://127.0.0.1:4250/@denotest/add/1.0.0_meta.json Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts Download http://localhost:4260/@denotest/esm-basic Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +[UNORDERED_END] diff --git a/tests/specs/jsr/deps/main.out b/tests/specs/jsr/deps/main.out index 48f75c0819..ecea42a0d4 100644 --- a/tests/specs/jsr/deps/main.out +++ b/tests/specs/jsr/deps/main.out @@ -1,9 +1,11 @@ Download http://127.0.0.1:4250/@denotest/deps/meta.json Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json +[UNORDERED_START] Download http://127.0.0.1:4250/@denotest/module-graph/meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json +[UNORDERED_END] [UNORDERED_START] Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts diff --git a/tests/specs/jsr/deps/main_info.out b/tests/specs/jsr/deps/main_info.out index 0abdfa9401..ba0c571bb1 100644 --- a/tests/specs/jsr/deps/main_info.out +++ b/tests/specs/jsr/deps/main_info.out @@ -1,9 +1,11 @@ Download http://127.0.0.1:4250/@denotest/deps/meta.json Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json +[UNORDERED_START] Download http://127.0.0.1:4250/@denotest/module-graph/meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0_meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json +[UNORDERED_END] [UNORDERED_START] Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts diff --git a/tests/specs/jsr/import_jsr_via_https/main.out b/tests/specs/jsr/import_jsr_via_https/main.out index cb4c27fb07..29f98c2cf5 100644 --- a/tests/specs/jsr/import_jsr_via_https/main.out +++ b/tests/specs/jsr/import_jsr_via_https/main.out @@ -1,4 +1,5 @@ Download http://127.0.0.1:4250/@denotest/deps/1.0.0_meta.json +[UNORDERED_START] Download http://127.0.0.1:4250/@denotest/deps/1.0.0/mod.ts Download http://127.0.0.1:4250/@denotest/module-graph/meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/meta.json @@ -7,4 +8,5 @@ Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1_meta.json Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/mod.ts Download http://127.0.0.1:4250/@denotest/no-module-graph/0.1.1/TestClass.ts Download http://127.0.0.1:4250/@denotest/module-graph/1.4.0/other.ts +[UNORDERED_END] 0.1.1 diff --git a/tests/specs/jsr/subset_type_graph/main.check.out b/tests/specs/jsr/subset_type_graph/main.check.out index f46610c0a5..35890e57f3 100644 --- a/tests/specs/jsr/subset_type_graph/main.check.out +++ b/tests/specs/jsr/subset_type_graph/main.check.out @@ -1,7 +1,9 @@ +[UNORDERED_START] Download http://127.0.0.1:4250/@denotest/subset-type-graph/meta.json Download http://127.0.0.1:4250/@denotest/subset-type-graph-invalid/meta.json Download http://127.0.0.1:4250/@denotest/subset-type-graph/0.1.0_meta.json Download http://127.0.0.1:4250/@denotest/subset-type-graph-invalid/0.1.0_meta.json +[UNORDERED_END] [UNORDERED_START] Download http://127.0.0.1:4250/@denotest/subset-type-graph/0.1.0/mod.ts Download http://127.0.0.1:4250/@denotest/subset-type-graph-invalid/0.1.0/mod.ts