From 8dc242f7891492886827a350b7736c11df7aa419 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 11 Nov 2022 11:33:57 -0500 Subject: 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` 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. --- cli/tests/testdata/cache/037_fetch_multiple.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tests/testdata/cache') 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 -- cgit v1.2.3