guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

09/14: Split up handling of package description data


From: Christopher Baines
Subject: 09/14: Split up handling of package description data
Date: Fri, 2 Feb 2024 10:58:39 -0500 (EST)

cbaines pushed a commit to branch master
in repository data-service.

commit d5e663cc1eeace03ebf2d33eacfa40fbd996d716
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Wed Jan 31 20:20:48 2024 +0100

    Split up handling of package description data
    
    To hopefully see which part is slow.
---
 guix-data-service/model/package-metadata.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/guix-data-service/model/package-metadata.scm 
b/guix-data-service/model/package-metadata.scm
index 17f4e10..77f24c6 100644
--- a/guix-data-service/model/package-metadata.scm
+++ b/guix-data-service/model/package-metadata.scm
@@ -368,12 +368,8 @@ WHERE packages.id IN (
       (((id)) id))))
 
 (define (package-description-data->package-description-set-id
-         conn descriptions-by-locale)
-  (let* ((package-description-ids
-          (package-description-data->package-description-ids
-           conn
-           descriptions-by-locale))
-         (package-description-set-id
+         conn package-description-ids)
+  (let* ((package-description-set-id
           (exec-query
            conn
            (string-append
@@ -418,12 +414,17 @@ WHERE packages.id IN (
            package-metadata))
     license-set-ids
     (with-time-logging "preparing package description set ids"
-      (map (match-lambda
-             ((_ _ package-description-data _)
-              (package-description-data->package-description-set-id
-               conn
-               package-description-data)))
-           package-metadata))
+      (map (lambda (package-description-ids)
+             (package-description-data->package-description-set-id
+              conn
+              package-description-ids))
+           (with-time-logging "preparing package description ids"
+             (map (match-lambda
+                    ((_ _ package-description-data _)
+                     (package-description-data->package-description-ids
+                      conn
+                      package-description-data)))
+                  package-metadata))))
     (with-time-logging "preparing package synopsis set ids"
       (map (match-lambda
              ((_ _ _ package-synopsis-data)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]