deno/cli/util
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
..
progress_bar fix(cli): occasional panics on progress bar (#22809) 2024-03-08 14:27:58 -07:00
v8 refactor(lsp): Have JS drive TSC event loop in LSP (#23565) 2024-05-09 13:49:10 -07:00
checksum.rs perf(cli): use faster_hex (#22761) 2024-03-07 10:00:43 -07:00
console.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
diff.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
display.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
draw_thread.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
file_watcher.rs chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
fs.rs perf(cli): Optimize setting up node_modules on macOS (#23980) 2024-05-28 11:59:17 -07:00
gitignore.rs feat(runtime): Allow embedders to perform additional access checks on file open (#23208) 2024-04-19 18:12:03 -06:00
logger.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
mod.rs refactor: remove custom utc_now in favor of chrono::Utc:now feature (#23888) 2024-05-23 13:59:11 +02:00
path.rs fix(npm): set up node_modules/.bin/ entries for package that provide bin entrypoints (#23496) 2024-05-23 23:43:38 +00:00
result.rs refactor(lsp): Have JS drive TSC event loop in LSP (#23565) 2024-05-09 13:49:10 -07:00
sync.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
text_encoding.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 03:15:22 +00:00
unix.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
v8.rs refactor(lsp): Have JS drive TSC event loop in LSP (#23565) 2024-05-09 13:49:10 -07:00
windows.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00