aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-05-17 18:35:19 +0100
committerChristopher Baines <mail@cbaines.net>2021-05-17 18:35:19 +0100
commitb8bfdcf622a00264936a952932296bc4f13bdf37 (patch)
tree941bc9c9c2ddcf6a6a943a19804f415d13bcce46 /guix-data-service
parentda0ee9dff0a730b06e9acb4611099f6174793e49 (diff)
downloaddata-service-b8bfdcf622a00264936a952932296bc4f13bdf37.tar
data-service-b8bfdcf622a00264936a952932296bc4f13bdf37.tar.gz
Remove the "derivations using output" data
From the HTML and JSON responses, since this data isn't very useful, and the query to collect the small amount which is displayed is very slow. This could return at some point, but in a proper paginated form which isn't slow.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/web/controller.scm24
-rw-r--r--guix-data-service/web/view/html.scm25
2 files changed, 6 insertions, 43 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm
index 5e10e41..60773ca 100644
--- a/guix-data-service/web/controller.scm
+++ b/guix-data-service/web/controller.scm
@@ -424,16 +424,7 @@
filename)))))
#:extra-headers http-headers-for-unchanging-content))))
(derivations
- (letpar& ((derivations-using-store-item-list
- (with-thread-postgresql-connection
- (lambda (conn)
- (map (lambda (derivation)
- (match derivation
- ((file-name output-id rest ...)
- (select-derivations-using-output
- conn output-id))))
- derivations))))
- (nars
+ (letpar& ((nars
(with-thread-postgresql-connection
(lambda (conn)
(select-nars-for-output conn filename))))
@@ -446,7 +437,6 @@
(render-html
#:sxml (view-store-item filename
derivations
- derivations-using-store-item-list
nars
builds)))))))
@@ -510,16 +500,8 @@
(map
(match-lambda
((filename output-id)
- `((filename . ,filename)
- (derivations-using-store-item
- . ,(list->vector
- (map car
- (parallel-via-thread-pool-channel
- (with-thread-postgresql-connection
- (lambda (conn)
- (select-derivations-using-output
- conn output-id))))))))))
- derivations))))))))))
+ `((filename . ,filename))))
+ derivations))))))))))
(define handle-static-assets
(if assets-dir-in-store?
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 2093217..f22595b 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -450,7 +450,6 @@
(define (view-store-item filename
derivations
- derivations-using-store-item-list
nars
builds)
(layout
@@ -530,7 +529,7 @@
derivation-file-name)))
,(build-status-span status))))
builds)))
- ,@(map (lambda (derivation derivations-using-store-item)
+ ,@(map (lambda (derivation)
`((div
(@ (class "row"))
(div
@@ -539,26 +538,8 @@
,(match derivation
((file-name output-id)
`(a (@ (href ,file-name))
- ,(display-store-item file-name))))))
- (div
- (@ (class "row"))
- (div
- (@ (class "col-sm-12"))
- (h2 "Derivations using this store item "
- ,(let ((count (length derivations-using-store-item)))
- (if (eq? count 100)
- "(> 100)"
- (simple-format #f "(~A)" count))))
- (ul
- (@ (class "list-unstyled"))
- ,(map
- (match-lambda
- ((file-name)
- `(li (a (@ (href ,file-name))
- ,(display-store-item file-name)))))
- derivations-using-store-item))))))
- derivations
- derivations-using-store-item-list)))))
+ ,(display-store-item file-name))))))))
+ derivations)))))
(define (view-derivation-source-file filename details)
(define labels