nix-community / nix-index

Quickly locate nix packages with specific files [maintainers=@bennofs @figsoda @raitobezarius]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could nix-index make store optimization faster?

mikepurvis opened this issue · comments

Running nix store optimize can be slow on even relatively small stores, since it needs to hash everything to find files that are identical between store paths. Could there be a role for nix-index in supplying individual file hashes for known store paths, so that optimization becomes trivial?

Could there be a role for nix-index in supplying individual file hashes for known store paths, so that optimization becomes trivial?

The cache of nix-index is not always up to date and identically to the nix store but since binaries rarely move around that is not a problem. Using such stale cache for optimization is probably not beneficial.