Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 7d8d78f06a63
Choose a base ref
...
head repository: NixOS/nix
compare: b981e5aacf38
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 8, 2020

  1. Make LocalStore::addToStore(srcPath) run in constant memory

    This reduces memory consumption of
    
      nix-instantiate \
        -E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \
        --option nar-buffer-size 10000
    
    (where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still
    ensuring that we don't do any write I/O for small source paths (up to
    'nar-buffer-size' bytes). The downside is that large paths are now
    always written to a temporary location in the store, even if they
    produce an already valid store path. Thus, adding large paths might be
    slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always
    restore the old behaviour by setting 'nar-buffer-size' to a very high
    value.
    edolstra committed Jul 8, 2020
    3
    Copy the full SHA
    34f2512 View commit details
    Browse the repository at this point in the history
  2. Cleanup

    edolstra committed Jul 8, 2020
    Copy the full SHA
    b981e5a View commit details
    Browse the repository at this point in the history