diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-11-11 11:33:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 11:33:57 -0500 |
commit | 8dc242f7891492886827a350b7736c11df7aa419 (patch) | |
tree | f9d9ceca4361c71ba08b0e304d2e4a1696ed9140 /cli/tests | |
parent | 7f0546a6b736430e6c39c55cfa77f39e70ffc9a2 (diff) |
perf: more efficient `deno cache` and npm package info usage (#16592)
1. There was a lot of cloning going on with `NpmPackageInfo`. This is
now stored in an `Arc<NpmPackageInfo>` and cloning only happens on the
individual version.
2. The package cache is now cleared from memory after resolution.
3. This surfaced a bug in `deno cache` and I noticed it can be more
efficient if we have multiple root specifiers if we provide all the
specifiers as roots.
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/cache/037_fetch_multiple.out | 2 | ||||
-rw-r--r-- | cli/tests/testdata/npm/deno_cache.out | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/cli/tests/testdata/cache/037_fetch_multiple.out b/cli/tests/testdata/cache/037_fetch_multiple.out index 09c6c0f60..f4c0c314b 100644 --- a/cli/tests/testdata/cache/037_fetch_multiple.out +++ b/cli/tests/testdata/cache/037_fetch_multiple.out @@ -1,5 +1,5 @@ Download http://localhost:4545/subdir/mod2.ts +Download http://localhost:4545/subdir/mt_text_typescript.t1.ts Download http://localhost:4545/subdir/print_hello.ts Check [WILDCARD]/fetch/test.ts -Download http://localhost:4545/subdir/mt_text_typescript.t1.ts Check [WILDCARD]/fetch/other.ts diff --git a/cli/tests/testdata/npm/deno_cache.out b/cli/tests/testdata/npm/deno_cache.out index 957919df1..e4f03e2f1 100644 --- a/cli/tests/testdata/npm/deno_cache.out +++ b/cli/tests/testdata/npm/deno_cache.out @@ -1,5 +1,4 @@ Download http://localhost:4545/npm/registry/chalk -Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz Download http://localhost:4545/npm/registry/mkdirp Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz Download http://localhost:4545/npm/registry/mkdirp/mkdirp-1.0.4.tgz |