1e816296

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Force what the outputs share before forking anything

Forcing it only once an attribute had been reported meant paying for it
twice: the first worker forced it while evaluating that attribute, and the
coordinator forced it again afterwards so that later workers would not have
to. Worse, the second time blocked the run, because the coordinator is also
the process servicing every worker. Measured against master that made the
whole thing slower than doing nothing: nx-experiment 3.6s against 5.9s,
sydtest 20.5s against 25.3s.

So the first derivation the discovery root can reach is forced before the
first worker is forked, where there is nothing else to be doing: no worker
exists yet, and the one about to be forked would have spent that time
forcing the same thing for itself. Forcing per output type stays, for the
case the walk reaches a cheaper corner of the flake than the run goes on to
work in, and now usually finds its work already done.

The fixture now reports one substrate evaluation rather than two, at both
pool sizes.
GitHub
nix-ci-evalnix-ci-eval-integration-testnix-ci-eval-shallow-fetch-testnix-ci-eval-stack-depth-testnix-ci-eval-substrate-testnix-ci-evalnix-ci-eval-integration-testnix-ci-eval-shallow-fetch-testnix-ci-eval-stack-depth-testnix-ci-eval-substrate-testconfiguredevShelldefaultnix-ci-evaldefaultnix-ci-evalaarch64-linuxx86_64-linux