store: Add a functional object cache and use it in 'lower-object'.
authorLudovic Courtès <ludo@gnu.org>
Fri, 20 Nov 2015 17:44:29 +0000 (18:44 +0100)
committerLudovic Courtès <ludo@gnu.org>
Mon, 12 Nov 2018 22:37:13 +0000 (23:37 +0100)
commitc6080c3249560ef777b9a4eb6a78e7605b8b98d8
treedf4d2676a8ca18949f4ff3c9e1d6d54ca7aa8a9b
parent9ed86fe175c15c819d6d86681c8136ff6bc927c0
store: Add a functional object cache and use it in 'lower-object'.

This leads to ~25% improvements on things like:

  guix system build desktop.tmpl --no-grafts -d

* guix/store.scm (<nix-server>)[object-cache]: New field.
* guix/store.scm (open-connection): Initialize it.
(cache-object-mapping, lookup-cached-object, %mcached): New procedures.
(mcached): New macro.
* guix/gexp.scm (lower-object): Use it.
* guix/grafts.scm (grafting?): New procedure.
guix/gexp.scm
guix/grafts.scm
guix/store.scm