summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-05-28 17:32:58 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-08 09:25:50 +0200
commit0c109026093e6fa8730efe0d7454656275d6efe3 (patch)
tree22658c44219f72ef303fbb1cb129005da3b04db1 /gnu
parentfde3c349f511ac1237099511b5bdba5fbf541879 (diff)
downloadguix-patches-0c109026093e6fa8730efe0d7454656275d6efe3.tar
guix-patches-0c109026093e6fa8730efe0d7454656275d6efe3.tar.gz
grafts: Cache the derivation/graft mapping for the whole session.
Partly fixes <https://bugs.gnu.org/41702>. Reported by Lars-Dominik Braun <ldb@leibniz-psychology.org>. Previously, 'graft-derivation' would start anew at every call. When creating a profile with lots of packages, it would potentially do the same work multiple times. The per-session cache addresses this. It increases the derivation-graft-cache hit rate from 77.9% to 80.1% on: GUIX_PROFILING="derivation-graft-cache" ./pre-inst-env \ guix environment --ad-hoc libreoffice inkscape krita darktable -n The effect is more visible on the pathological case below, where cache hit rate goes from 75% to 87% and wall-clock time from 5.0s to 3.5s: GUIX_PROFILING="derivation-graft-cache" ./pre-inst-env \ guix environment --ad-hoc r-learnr --search-paths * guix/grafts.scm (%graft-cache): New variable. (graft-derivation): Add calls to 'store-connection-cache' and 'set-store-connection-cache!'.
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions