Attempt to reduce memory churn when processing package metadata

This commit is contained in:
Christopher Baines 2024-12-22 11:05:38 +00:00
parent cdffef2397
commit d3c87fb1dc
3 changed files with 83 additions and 66 deletions

View file

@ -48,6 +48,9 @@
(inferior-packages->license-id-lists
conn
'#((("License 1"
"https://gnu.org/licenses/test-1.html"
"https://example.com/why-license-1"))
(("License 1"
"https://gnu.org/licenses/test-1.html"
"https://example.com/why-license-1"))))))
@ -74,7 +77,8 @@
conn
mock-package-metadata
(test-license-set-ids conn))
(#(x) (number? x))))
(#(x y) (and (number? x)
(number? y)))))
#:always-rollback? #t))
(with-postgresql-transaction

View file

@ -37,6 +37,9 @@
(inferior-packages->license-id-lists
conn
'#((("License 1"
"https://gnu.org/licenses/test-1.html"
"https://example.com/why-license-1"))
(("License 1"
"https://gnu.org/licenses/test-1.html"
"https://example.com/why-license-1"))))))
@ -87,7 +90,8 @@
(map mock-inferior-package-version mock-inferior-packages)
(vector->list package-metadata-ids)
package-replacement-package-ids)))
(#(x) (number? x))))))
(#(x y) (and (number? x)
(number? y)))))))
#:always-rollback? #t)
(with-postgresql-transaction