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
2.5 KiB
Executable File
2.5 KiB
Executable File