summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-11-26 23:00:36 +0100
committerLudovic Courtès <ludo@gnu.org>2016-11-26 23:21:37 +0100
commit1cd1d8a7ea43bfb99aa05c74da5430bb3d8a4309 (patch)
tree881a869afffbab581d93c4dfebe1875d022801a4 /gnu
parentc3e2a2471cae95a4f08b97739ee315e14a332986 (diff)
downloadguix-1cd1d8a7ea43bfb99aa05c74da5430bb3d8a4309.tar.gz
offload: Call 'machine-load' only once per machine.
This fixes a longstanding issue where 'choose-build-machine' would make
on average O(N log(N)) calls to 'machine-load', plus an extra call for
the selected machine, instead of N calls.

* guix/scripts/offload.scm (machine-load): Add comment.
(machine-power-factor, machine-less-loaded-or-faster?): Remove.
(choose-build-machine)[machines+slots]: Rename to...
[machines+slots+loads]: ... this.
[undecorate]: Adjust accordingly.
[machine-less-loaded-or-faster?]: New procedure.
Remove extra 'machine-load' call in body.
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions