You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With `nodeModulesDir: auto` (and `none`, to a lesser extent), we
frequently repeatedly try to cache npm packages during resolution. On a
(private) fresh project, I counted that `sync_resolution_with_fs` was
called 478 times over the course of a fresh build. This reduces the
number of calls to 8, and doing so speeds things up substantially.
```
❯ hyperfine --warmup 2 -N "deno task build" "../deno/target/release-lite/deno task build"
Benchmark 1: deno task build
Time (mean ± σ): 3.652 s ± 0.042 s [User: 3.285 s, System: 2.399 s]
Range (min … max): 3.587 s … 3.712 s 10 runs
Benchmark 2: ../deno/target/release-lite/deno task build
Time (mean ± σ): 1.356 s ± 0.007 s [User: 1.961 s, System: 1.108 s]
Range (min … max): 1.345 s … 1.372 s 10 runs
Summary
../deno/target/release-lite/deno task build ran
2.69 ± 0.03 times faster than deno task build
```
0 commit comments