1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-09 10:31:02 +01:00
nix/tests
Sergei Zimmerman c5c05e44b3
Make nix nar cat work on pipes too
This was lost after 2.32 while making the accessor lazy. We can restore the support
for it pretty easily. Also this is significant optimization for nix nar cat.
E.g. with a NAR of a linux repo this speeds up by ~3x:

Benchmark 1: nix nar cat /tmp/linux.nar README
  Time (mean ± σ):     737.2 ms ±   5.6 ms    [User: 298.1 ms, System: 435.7 ms]
  Range (min … max):   728.6 ms … 746.9 ms    10 runs

Benchmark 2: build/src/nix/nix nar cat /tmp/linux.nar README
  Time (mean ± σ):     253.5 ms ±   2.9 ms    [User: 56.4 ms, System: 196.3 ms]
  Range (min … max):   248.1 ms … 258.7 ms    12 runs
2025-12-08 03:26:03 +03:00
..
functional Make nix nar cat work on pipes too 2025-12-08 03:26:03 +03:00
installer Format .nix files 2025-01-24 17:04:02 +01:00
nixos Introduce --json-format for nix path-info 2025-12-03 22:04:21 -05:00
repl-completion.nix Format .nix files 2025-01-24 17:04:02 +01:00