aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-08-13 12:30:29 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-10-05 18:55:55 +0000
commitf743f2046be2c5a338ab871ae8666d8f6de7440b (patch)
tree464dd1c774bf3f8f7b8cfb66fe72602b8df4725d /gnu
parenta7028d4323744152aaccf66af25ad2c9445bc01e (diff)
downloadguix-f743f2046be2c5a338ab871ae8666d8f6de7440b.tar.gz
guix-f743f2046be2c5a338ab871ae8666d8f6de7440b.zip
publish: Defer narinfo string creation to the http-write.
The "narinfo-string" procedure is expensive in term of IO operations and can take a while under IO pressure, such a GC collecting. Defer its call to a new thread created in the http-write procedure. Fixes: <https://issues.guix.gnu.org/48468> Partially fixes: <https://issues.guix.gnu.org/49089> * guix/scripts/publish.scm (render-narinfo): Defer the narinfo string creation to the http-write procedure. (compression->sexp, sexp->compression): New procedures. ("X-Nar-Compression"): Use them. ("X-Narinfo-Compressions"): New custom header. (strip-headers): Add the x-nar-path header. (http-write): Add narinfo on-the-fly creation support. It happens in a separated thread to prevent blocking the main thread.
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions