summaryrefslogtreecommitdiff
path: root/cli/cache/mod.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-10-01 06:15:56 -0400
committerGitHub <noreply@github.com>2022-10-01 12:15:56 +0200
commitecfafda9d8ead19cb35708f310e49176db2ec2b5 (patch)
tree222a52e0e5c06cc946d45240a6194c57b46a8724 /cli/cache/mod.rs
parent1058d1868fcc28ce115d1cc231e66016308b76ce (diff)
perf: node cjs & esm analysis cache (#16097)
This commit adds a cache for CJS and ESM analysis that is backed by an SQLite file. The connection to the DB is lazily created on first use, so shouldn't have impact on the startup time. Benched with running Vite Deno v1.26: ``` $ deno task dev Warning deno task is unstable and may drastically change in the future Task dev deno run -A --unstable --node-modules-dir npm:vite VITE v3.1.4 ready in 961 ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ``` This branch: ``` ../deno/target/release/deno task dev Warning deno task is unstable and may drastically change in the future Task dev deno run -A --unstable --node-modules-dir npm:vite VITE v3.1.4 ready in 330 ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ``` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/cache/mod.rs')
-rw-r--r--cli/cache/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs
index 6769f153d..16390013a 100644
--- a/cli/cache/mod.rs
+++ b/cli/cache/mod.rs
@@ -19,6 +19,7 @@ mod common;
mod disk_cache;
mod emit;
mod incremental;
+mod node;
mod parsed_source;
pub use check::TypeCheckCache;
@@ -26,6 +27,7 @@ pub use common::FastInsecureHasher;
pub use disk_cache::DiskCache;
pub use emit::EmitCache;
pub use incremental::IncrementalCache;
+pub use node::NodeAnalysisCache;
pub use parsed_source::ParsedSourceCache;
/// A "wrapper" for the FileFetcher and DiskCache for the Deno CLI that provides