Subject: bug#43340: closed (Re: [bug#43340] [PATCH 0/5] Speed up archive export/import)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 14 Sep 2020 13:48:02 +0000

Your bug report

#43340: [PATCH 0/5] Speed up archive export/import

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
43340: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43340
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#43340] [PATCH 0/5] Speed up archive export/import
From: Ludovic Courtès <[email-masked]>
To: Mathieu Othacehe <[email-masked]>
Cc: [email-masked]
Date: Mon, 14 Sep 2020 15:47:24 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

I went ahead and pushed this series as
7d516c17da50dfc8ce635a21c37533d1fe27b43b.

Changes compared to what I posted:

  • Use ‘make_shared’ and ‘isdigit’ (I’d never get a C++ developer
    position…).

  • Add an enum for reply codes in ‘guix authenticate’.

  • Fix a thinko in the last patch of the series: ensure ‘loop’ is
    called even when an exception is caught.

To people who use offloading: please give it a try by running the daemon
from a recent checkout with:

  sudo -E ./pre-inst-env  guix-daemon --build-users-group=guixbuild

Thanks,
Ludo’.

Subject: [PATCH 0/5] Speed up archive export/import
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Cc: Ludovic Courtès <[email-masked]>
Date: Fri, 11 Sep 2020 16:40:49 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

This patch series goes on top of <https://issues.guix.gnu.org/43285>.
It addresses the performance issue described at:

  https://lists.gnu.org/archive/html/guix-devel/2020-09/msg00073.html

Specifically, it implements option #4 (spawning ‘guix authenticate’
once for the whole session, instead of spawning it every time a
store item needs to be signed or authenticated), achieving a ~15x
speedup, which is not bad.  :-)

There’s way more C++ code than I would like, and it’s probably not
pretty code (I always end up typing things like “C++ list append”
in a search engine to find the obscure incantation that does that).
There’s now a query/reply protocol between the daemon and ‘guix
authenticate’.  Nothing fancy, but it allows for strings that contain
whitespace or newlines, which is necessary here.

That’s it!

Ludo’.

Ludovic Courtès (5):
  daemon: Generalize 'HookInstance' to 'Agent'.
  daemon: Isolate signing and signature verification functions.
  daemon: Move 'Agent' to libutil.
  daemon: Spawn 'guix authenticate' once for all.
  authenticate: Cache the ACL and key pairs.

 guix/scripts/authenticate.scm | 163 ++++++++++++++++++++++++++--------
 nix/libstore/build.cc         | 146 +++++-------------------------
 nix/libstore/local-store.cc   | 103 +++++++++++++++++----
 nix/libutil/util.cc           |  84 ++++++++++++++++++
 nix/libutil/util.hh           |  25 ++++++
 tests/guix-authenticate.sh    |  45 ++++++----
 tests/store.scm               |   8 +-
 7 files changed, 372 insertions(+), 202 deletions(-)

-- 
2.28.0