nickel-lang / organist

Control all your tooling from a single console
MIT License
421 stars 21 forks source link

Remove a useless Nixpkgs evaluation. #201

Closed thufschmitt closed 6 months ago

thufschmitt commented 6 months ago

I'm not entirely clear why, but this shoves off 20s (60%) of the evaluation time.

$ hyperfine --warmup=1 -L REF HEAD,HEAD^ 'nix develop --option eval-cache false git+file://$PWD\?rev=$(git rev-parse {REF}) --command true'
Benchmark 1: nix develop --option eval-cache false git+file://$PWD\?rev=$(git rev-parse HEAD) --command true
  Time (mean ± σ):     11.693 s ±  1.475 s    [User: 4.940 s, System: 1.424 s]
  Range (min … max):   10.723 s … 14.223 s    10 runs

Benchmark 2: nix develop --option eval-cache false git+file://$PWD\?rev=$(git rev-parse HEAD^) --command true
  Time (mean ± σ):     32.296 s ±  1.090 s    [User: 15.727 s, System: 3.563 s]
  Range (min … max):   31.281 s … 34.447 s    10 runs

Summary
  nix develop --option eval-cache false git+file://$PWD\?rev=$(git rev-parse HEAD) --command true ran
    2.76 ± 0.36 times faster than nix develop --option eval-cache false git+file://$PWD\?rev=$(git rev-parse HEAD^) --command true