aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/datastore
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-11-20 21:27:22 +0000
committerChristopher Baines <mail@cbaines.net>2021-11-20 21:27:22 +0000
commitc9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6 (patch)
treef69d19ad1656872ad70141cf84d78bcf02039327 /guix-build-coordinator/datastore
parent7756e6fdfd0a0ac737ecf233c9e62e52f7380fa3 (diff)
downloadbuild-coordinator-c9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6.tar
build-coordinator-c9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6.tar.gz
Log delays in insert-derivation-and-return-outputs
As I've seen this be quite slow.
Diffstat (limited to 'guix-build-coordinator/datastore')
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm28
1 files changed, 15 insertions, 13 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 828f9db..a09bde7 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -3355,19 +3355,21 @@ INSERT OR IGNORE INTO derivations (name, system_id, fixed_output)
(changes-count db)))))
- (let ((changes (insert-derivation)))
- (unless (eq? changes 0)
- (insert-derivation-inputs
- db
- derivation-name
- (derivation-inputs derivation))
-
- (insert-derivation-outputs
- db
- derivation-name
- (derivation-outputs derivation)))
-
- (select-derivation-outputs db derivation-name)))
+ (call-with-delay-logging
+ (lambda ()
+ (let ((changes (insert-derivation)))
+ (unless (eq? changes 0)
+ (insert-derivation-inputs
+ db
+ derivation-name
+ (derivation-inputs derivation))
+
+ (insert-derivation-outputs
+ db
+ derivation-name
+ (derivation-outputs derivation)))
+
+ (select-derivation-outputs db derivation-name)))))
(define (insert-derivation-inputs db derivation-name derivation-inputs)
(unless (null? derivation-inputs)