yarn-plugin-nixify
yarn-plugin-nixify copied to clipboard
Use `multipleOutputPaths` as optimization
In my case populating the cache using fetch-one
is painfully slow. ~6,000 dependencies, each takes ~0.3 ms to build with yarn, but ~2-4 seconds each spinning up build areas.
I think that by using multiple outputs in your cache builder you could drop a massive chunk of time spent spinning up and tearing down build areas.
Because the current cache builder processes these one at a time it takes ages. By using flat hash you won't poison the hashes by changing to multiple outputs AFAIK.
Possibly an even faster way since the yarn plugin runs externally of nix
: when populating the nix store from an existing cache, use nix-store --add-fixed sha512 .yarn/cache/*
and modify the tarball name or something to match the expected store path name.