From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id g6SQDDGYVmCIQwAA0tVLHw (envelope-from ) for ; Sun, 21 Mar 2021 00:49:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MDTGBzGYVmAUFAAAB5/wlQ (envelope-from ) for ; Sun, 21 Mar 2021 00:49:53 +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 604F1211D0 for ; Sun, 21 Mar 2021 01:49:52 +0100 (CET) Received: from localhost ([::1]:58112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNmHu-0003JZ-JI for larch@yhetil.org; Sat, 20 Mar 2021 20:49:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNmH8-0002sg-Ot for bug-guix@gnu.org; Sat, 20 Mar 2021 20:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNmH8-0004x5-Eq for bug-guix@gnu.org; Sat, 20 Mar 2021 20:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNmH8-0003OP-DS for bug-guix@gnu.org; Sat, 20 Mar 2021 20:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47283: Performance regression in narinfo fetching Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 21 Mar 2021 00:49: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: 47283@debbugs.gnu.org Received: via spool by 47283-submit@debbugs.gnu.org id=B47283.161628768912981 (code B ref 47283); Sun, 21 Mar 2021 00:49:02 +0000 Received: (at 47283) by debbugs.gnu.org; 21 Mar 2021 00:48:09 +0000 Received: from localhost ([127.0.0.1]:53360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNmGH-0003NJ-7Q for submit@debbugs.gnu.org; Sat, 20 Mar 2021 20:48:09 -0400 Received: from mira.cbaines.net ([212.71.252.8]:59670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNmGE-0003N9-FA for 47283@debbugs.gnu.org; Sat, 20 Mar 2021 20:48:07 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id 5673627BC57; Sun, 21 Mar 2021 00:48:04 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bfb097a1; Sun, 21 Mar 2021 00:48:04 +0000 (UTC) References: <87ft0p67z4.fsf@inria.fr> <874kh5d0rg.fsf@cbaines.net> User-agent: mu4e 1.4.15; emacs 27.1 From: Christopher Baines In-reply-to: <874kh5d0rg.fsf@cbaines.net> Date: Sun, 21 Mar 2021 00:48:03 +0000 Message-ID: <871rc9coxo.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: , 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=1616287792; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=WHRAlHHzEYN07ER9rnXjSgOq3peRBJfJcZ5gpKrRi2I=; b=KNOSPbhO15zWOPF27zbvKZdlch3f6PGJdZDwmhec6rXXd2ldW/pxnCTGmki5S3Y0aRoUkc L63IRZbfZSRGW2oqYVtr7Rdgyx7vCZ/pHl+88R9aKyrjTRG6RyZpdhC3osTqtjCx/ukDId 3PSF+M5B4ZC0IS3k2429lMcmxWFg2RMUNAA/vSLRwvgUm/EqoD4UEvwDqJ+kxxFMRtRlRO mGtMM2hLxBHNhvnburg/DYLtjFrrMkkozB3XoQepoy3vwZDqMSWrqjscUTkoFbXax43FYi DSoxxXwLHb1Kx4XJG/X66X9WTYO4qs9K3qK/OoO3kcFt0d6LPrvKEhpv9WGXEg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616287792; a=rsa-sha256; cv=none; b=CiAefftgFbTiXPlcRqGUaui27cdC6ltMkp2n9hTrhMtocVVkkZAJ72SoRyGQS5kAj/3TNB CfQ3ud0yQIHxNYAFe/SYGNHyZoh8e6N6eaGN6HjVsz/14i9NhsRVXx0RhMPwdku60Re98P R9R/d498Be/fbah85jca5M0YeWptlzqEOI2AZcqEQD2SWhrIBbWH938KEOTpF4T68zrYQW cqiBaEloAgSzj9jrGY8P8g/GU7JU4/sjlZNCjOnVN9vTfr0jwcwyDq3X5LG2IRZkjVHimP uN0rfwQMUpbVkICKPUTsIIs8Jok8NattAvu4x77vfjULRTk5lj+o7Fi1ELPCYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -4.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 604F1211D0 X-Spam-Score: -4.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9adshr2OL6sa --=-=-= Content-Type: text/plain 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. 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmBWl8NfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XfIpw//QGNGAFecZaN9H8GjP/XTfT7dU2MB2kcB qS6sIMtgPkBNRLLktK2HkQL9KQq2f8W0hTw+Kh7blzHPnBQwauwUDLukscSXxTH+ AOJMJ7WTOfgQoy2kAT3HLtzG7/Ww76arA6v1TzizttTSXz9dxbbFV9CnNRAtQqcW r4St0bnT1rfAcW1SHDrbl1Bs2ORxWlxhAjjwRNM6psK0QG/BWzft00JyfbiQT8YF qwG7zaJwiyOzhCJ2UWnrDlfapax0u4mzObbf+mSctIYynSFk3LJY/wEU35aWkkoZ coZPBaf2udXN4qzwRb26Yj8JduC6liKjbvzzMQiU7oSZ9pSNqADhFUJYrjblRURV GVA2h2pSk1fVOk/OikqEuyfPx5Kj0fsbQ1IMtmaGcbO1vNUhxISYRspwuFC1hCYv Cqw2kJ+0MbqggMANrw2qqszhMYb4zIqYkJDOeLh4rjUNluyzxIV6TWK76B7O7dz1 t6HnI66AigNosEMyH3u8ViATIe3Od1jmz7w7Q62t5QqiPPkKnF4CVd87p4YUrv2z oQ5piDwgNouAeBklsHNd6mXaetYLXtHg6GHEjBDZUeNRKciJ63+DAzAWd5ojLfVu cxUqR6Ag7p9zRVlUSIC6BTpKmJD7gC6RtmjeAQeAtDbDUSfo1+2+iq+1QEhcoA65 Xd/zFiFlE0U= =hdwE -----END PGP SIGNATURE----- --=-=-=--