From c6080c3249560ef777b9a4eb6a78e7605b8b98d8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 20 Nov 2015 18:44:29 +0100 Subject: 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 ()[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/grafts.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guix/grafts.scm') diff --git a/guix/grafts.scm b/guix/grafts.scm index f303e925f1..01e245d8eb 100644 --- a/guix/grafts.scm +++ b/guix/grafts.scm @@ -40,7 +40,8 @@ graft-derivation/shallow %graft? - set-grafting)) + set-grafting + grafting?)) (define-record-type* graft make-graft graft? @@ -328,6 +329,11 @@ it otherwise. It returns the previous setting." (lambda (store) (values (%graft? enable?) store))) +(define (grafting?) + "Return a Boolean indicating whether grafting is enabled." + (lambda (store) + (values (%graft?) store))) + ;; Local Variables: ;; eval: (put 'with-cache 'scheme-indent-function 1) ;; End: -- cgit v1.2.3