diff options
author | Christopher Baines <mail@cbaines.net> | 2021-11-20 21:27:22 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-11-20 21:27:22 +0000 |
commit | c9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6 (patch) | |
tree | f69d19ad1656872ad70141cf84d78bcf02039327 | |
parent | 7756e6fdfd0a0ac737ecf233c9e62e52f7380fa3 (diff) | |
download | build-coordinator-c9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6.tar build-coordinator-c9c7c97bbfb49cb5749e2e9e5075a8edbb3f82b6.tar.gz |
Log delays in insert-derivation-and-return-outputs
As I've seen this be quite slow.
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 28 |
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) |