What causes the lag after nix flake update?

When I run nix flake update on my deploy-rs configuration, it usually downloads nixos-unstable, about 37MB.

After the download completes, it still sits there for several tens of seconds. What is it doing?

It’s certainly unpacking a 60k files / directories in the store (approx 320 MB)

and if you enabled auto-store-optimise in nix, it will check for duplicate for each of these 60 k files with other files in the store.


Would be nice if it unpacked while downloading.
And of course even nicer if it only downloaded the diff :slight_smile:

1 Like

Pass a couple -vvvvvs and find out.


Didn’t think of that.

Indeed, the lag is caused by unpacking and linking. Solved :slight_smile: