deno/cli/npm/managed
Nathan Whitaker 3e8f29ae41
perf(cli): Optimize setting up node_modules on macOS (#23980)
Hard linking (`linkat`) is ridiculously slow on mac. `copyfile` is
better, but what's even faster is `clonefile`. It doesn't have the space
savings that comes with hardlinking, but the performance difference is
worth it imo.

```
❯ hyperfine -i -p 'rm -rf node_modules/' '../../d7/target/release/deno cache npm:@11ty/eleventy' 'deno cache npm:@11ty/eleventy'
Benchmark 1: ../../d7/target/release/deno cache npm:@11ty/eleventy
  Time (mean ± σ):     115.4 ms ±   1.2 ms    [User: 27.2 ms, System: 87.3 ms]
  Range (min … max):   113.7 ms … 117.5 ms    10 runs

Benchmark 2: deno cache npm:@11ty/eleventy
  Time (mean ± σ):     619.3 ms ±   6.4 ms    [User: 34.3 ms, System: 575.6 ms]
  Range (min … max):   612.2 ms … 633.3 ms    10 runs

Summary
  ../../d7/target/release/deno cache npm:@11ty/eleventy ran
    5.37 ± 0.08 times faster than deno cache npm:@11ty/eleventy
```
2024-05-28 11:59:17 -07:00
..
resolvers perf(cli): Optimize setting up node_modules on macOS (#23980) 2024-05-28 11:59:17 -07:00
cache.rs FUTURE: initial support for .npmrc file (#23560) 2024-05-23 23:26:23 +02:00
installer.rs feat(lockfile): track JSR and npm dependencies in config file (#22004) 2024-01-22 22:31:12 +01:00
mod.rs feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) 2024-05-28 14:58:43 -04:00
registry.rs FUTURE: initial support for .npmrc file (#23560) 2024-05-23 23:26:23 +02:00
resolution.rs feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) 2024-05-28 14:58:43 -04:00
tarball.rs fix(npm): make tarball extraction more reliable (#23759) 2024-05-14 14:26:48 -04:00