mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
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>
This commit is contained in:
parent
1058d1868f
commit
ecfafda9d8
8 changed files with 449 additions and 14 deletions
2
cli/cache/mod.rs
vendored
2
cli/cache/mod.rs
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue