From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id /scxA2+2V2BEQgAA0tVLHw (envelope-from ) for ; Sun, 21 Mar 2021 21:11:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ADwROm62V2AmcQAAB5/wlQ (envelope-from ) for ; Sun, 21 Mar 2021 21:11:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5273C202E6 for ; Sun, 21 Mar 2021 22:11:10 +0100 (CET) Received: from localhost ([::1]:52700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO5Lo-0005lm-Sj for larch@yhetil.org; Sun, 21 Mar 2021 17:11:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lO5Li-0005ld-FZ for bug-guix@gnu.org; Sun, 21 Mar 2021 17:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lO5Li-0005n3-84 for bug-guix@gnu.org; Sun, 21 Mar 2021 17:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lO5Li-0001kU-26 for bug-guix@gnu.org; Sun, 21 Mar 2021 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47283: Performance regression in narinfo fetching Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 21 Mar 2021 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47283 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines Received: via spool by 47283-submit@debbugs.gnu.org id=B47283.16163610536705 (code B ref 47283); Sun, 21 Mar 2021 21:11:02 +0000 Received: (at 47283) by debbugs.gnu.org; 21 Mar 2021 21:10:53 +0000 Received: from localhost ([127.0.0.1]:55556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO5LY-0001k5-MV for submit@debbugs.gnu.org; Sun, 21 Mar 2021 17:10:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO5LU-0001jn-VH for 47283@debbugs.gnu.org; Sun, 21 Mar 2021 17:10:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44440) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lO5LP-0005Yi-9E; Sun, 21 Mar 2021 17:10:43 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39076 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lO5LO-0002pQ-NB; Sun, 21 Mar 2021 17:10:42 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ft0p67z4.fsf@inria.fr> <874kh5d0rg.fsf@cbaines.net> <871rc9coxo.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Germinal an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 21 Mar 2021 22:10:40 +0100 In-Reply-To: <871rc9coxo.fsf@cbaines.net> (Christopher Baines's message of "Sun, 21 Mar 2021 00:48:03 +0000") Message-ID: <87o8fc1acv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47283@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616361070; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=CYu5DusE16lIGLnTPjhrWlze/rL8Ll1V1vf6ErFbhnE=; b=GgFH0GDJQ/qtmEYQaSBUeB8Tuyla88kd1db1gWClxL16oMLABldDxTfM/tyP72hpiYwF1o QVLhEYmqlAYcvJt2gxWP2SP1QgHOa2RSX0chXRN+jcadUvqXdqQBHUJRDCfiDhr+nDwgVM pm/cbkx9xbifmYSeW7etch7IHPLkLpd8eGKYCrADMnHPHttaRts5lDIaB14Y5SEklfs6mP eOjZepFvGeNMn7Vbw7W2J9D+ksoXebm3t3GgqI9CkakPb/O67g2STFFjc0aBwiD9P8vRbJ IaDSyVvu/kqj3azkvfGFUVaC3ru5vwtvgL+YHeS/2fg/z64EPOAFVkjWbhSkIA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616361070; a=rsa-sha256; cv=none; b=ckmjUHJ7yW/wXwE1zfdojpSCDS8aJaYBzDTHipJ8ZpFW6S6NR6qVhLki8x8yCg06O1eHam Zwqga1IFTIuwvZHFh9Kuwv4gDe2umrjnPA7W+kUPLvNKeS2xZo7B5apByeTvu+2NJ7mFKE fsmrpqUydeEJOpKt7ftOl0Cqcv4uZFC4Or7WOgsihXZDgWAaVTnGazgsVYZ15bJpQTi/li ZYt4PbARu+8rmJUgA+GfRbUaeVbEmmCwFWa8cM6H0ww0vb7o4uZhm1aWF5bdPpn2C4g7R+ LMW6yKet2tB4Jz61jb7+G9dpd/Q//G5t00J4H4fzBVQbmPwjpCnIKTlE6UPHKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 5273C202E6 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: QtlVrjO15Sjk Hi! Christopher Baines skribis: > Christopher Baines 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=E2=80=99s also because calling =E2=80=98loop=E2=80=99 from wit= hin =E2=80=98catch=E2=80=99 made it a non-tail call, so we kept accumulating exception handlers, and the =E2=80= =98lp=E2=80=99 loop in =E2=80=98raise-exception=E2=80=99 would have an ever increasing lis= t 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=E2=80=99ll reply to your other message first. :-) Ludo=E2=80=99.