From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 47283@debbugs.gnu.org
Subject: bug#47283: Performance regression in narinfo fetching
Date: Sun, 21 Mar 2021 22:10:40 +0100 [thread overview]
Message-ID: <87o8fc1acv.fsf@gnu.org> (raw)
In-Reply-To: <871rc9coxo.fsf@cbaines.net> (Christopher Baines's message of "Sun, 21 Mar 2021 00:48:03 +0000")
Hi!
Christopher Baines <mail@cbaines.net> skribis:
> Christopher Baines <mail@cbaines.net> writes:
>
>> I haven't looked in to this yet, but maybe it would be possible to
>> adjust the code so that it doesn't perform so badly, but still tries to
>> handle possible exceptions.
>>
>> The two ideas I have is to rewrite the (let ...) bit in terms of a fold,
>> maybe that would perform better, or stop using let for iteration and
>> setup the exception handling, then process each request, using set! to
>> update the state. I haven't tested either of these.
>
> I tried something, neither of these things, but just not calling (loop
> ...) within the catch block. I don't know why this might work, but it
> seems to make guix weather much faster.
Oh yes, that’s also because calling ‘loop’ from within ‘catch’ made it a
non-tail call, so we kept accumulating exception handlers, and the ‘lp’
loop in ‘raise-exception’ would have an ever increasing list of handlers
to traverse.
> Here's the patch [1], I've just realised it's broken, as it'll loose the
> result value (and use an old one) when the connection is closed. I'll
> send a updated patch without this issue in a moment.
>
> 1: https://issues.guix.gnu.org/47288
OK, thanks. I’ll reply to your other message first. :-)
Ludo’.
next prev parent reply other threads:[~2021-03-21 21:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-20 17:38 bug#47283: Performance regression in narinfo fetching Ludovic Courtès
2021-03-20 20:32 ` Christopher Baines
2021-03-21 0:48 ` Christopher Baines
2021-03-21 21:10 ` Ludovic Courtès [this message]
2021-03-21 21:22 ` Ludovic Courtès
2021-03-23 20:47 ` Christopher Baines
2021-03-24 14:51 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8fc1acv.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=47283@debbugs.gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).