From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AOQZNBPmUmEKdwAAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 11:53:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eNyyLxPmUmHcKQAAbx9fmQ (envelope-from ) for ; Tue, 28 Sep 2021 09:53:23 +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 721CE35CCE for ; Tue, 28 Sep 2021 11:53:22 +0200 (CEST) Received: from localhost ([::1]:41776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV9nd-0005hq-H2 for larch@yhetil.org; Tue, 28 Sep 2021 05:53:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV9nK-0005gg-5N for guix-patches@gnu.org; Tue, 28 Sep 2021 05:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV9nJ-0004bX-UU for guix-patches@gnu.org; Tue, 28 Sep 2021 05:53:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mV9nJ-0007ZS-M6 for guix-patches@gnu.org; Tue, 28 Sep 2021 05:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50755] [PATCH v3] import: Generate list of importers based on available modules Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Sep 2021 09:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50755 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun , pinoaffe Cc: 50755@debbugs.gnu.org Received: via spool by 50755-submit@debbugs.gnu.org id=B50755.163282273929052 (code B ref 50755); Tue, 28 Sep 2021 09:53:01 +0000 Received: (at 50755) by debbugs.gnu.org; 28 Sep 2021 09:52:19 +0000 Received: from localhost ([127.0.0.1]:43906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mV9md-0007YW-4i for submit@debbugs.gnu.org; Tue, 28 Sep 2021 05:52:19 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:36094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mV9mb-0007YN-Jd for 50755@debbugs.gnu.org; Tue, 28 Sep 2021 05:52:18 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id zMsC2500D0mfAB406MsCS5; Tue, 28 Sep 2021 11:52:14 +0200 Message-ID: <4ddbb2adfa86c9ed2e1cf01ad5c1d0129553cbae.camel@telenet.be> From: Maxime Devos Date: Tue, 28 Sep 2021 11:51:48 +0200 In-Reply-To: References: <87tuibh43w.fsf@airmail.cc> <87mtnxswwq.fsf@airmail.cc> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-oMv4/1jwYXTcsW/NpSiQ" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1632822735; bh=/xiOlOheQtVh2c4FoxoOMgnDy6dDRbnzVcHJJ/4TNBQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=iYYiMuqG7yoIxqund+Pi/u4KMglCBVVQDieLr+77ra6mCOlwCjM9ocx929dn80KJj P2DYfpkm2Aaehk6WuEBx+4Xgxx891/fAYgBADWCp4me1TT7S49BA1yxWs6RrMb0m2g 6746MWf5pijAiVOfat9ke8iHmC/2MKDIbQEbJpqQzO6isAo+8+9t/juctgjqt2ePSg /3VSdGKip8k8qtaDpFFoNAkrTgir2GWThlyTXN+bb5xa7uh2XLcPKb46FCOqBBaeCz T8cnykVm6SuwEZtNgmEBrCkV/wlVGr5AZtneUoleKEXy673WJmISRNac1PaM5Fxp4L ney3uhG1n8mNg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632822802; 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: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: dkim-signature; bh=/xiOlOheQtVh2c4FoxoOMgnDy6dDRbnzVcHJJ/4TNBQ=; b=bgVWdyOJ0I6ZY69lN7IVYqNcXX1rWKdwjNiwDCH3rqFf0zeDC3droEaRnzd46LWhqqnYbo YGzyrbC6UUieViSKecMzdBgVm5V8OG00dzZpTpgYysHXgw7LfHQ4OzOsk23WKSGEiJZGUN pM2gye7/LYNm31+x8N/bwIYaU4ldJFj9aIlhnP0zBvEqPAL/k5AePZHDbO1ekfWr+p1Kez CUmZ/r/Cxmx3hW7RjuepAqag7pj373WwrBfVK1q8aOC/puXkVhYnkhFhdHq/zmPrTDRqdz HWcCEPoTzAzE+kePPC5j9foDPT3fsW6A12stkCj+gpumwx7RyJvdW9hUP4dbfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632822802; a=rsa-sha256; cv=none; b=lZAs+HqXDjBFsmB9rK/HGuahI+S310B34qkeJLjCr92/YlR8N/hP5x7RXTcBGg3wTHj0m4 GexygHOE4Bbg0VkCJCpHLIMcylkzubmmACR2g4EbVikILUl+k2fqfJGjG6QPjx5hE101DZ Pm+iFnCa5868rdb3xTj0LeGx5A9iHsygK1wYuYuNNZkleSgg8YhGjaTkU4PXH5xUxO2CTX CoO+9hCU4ypSMYUNnFRiaJ6LFmWeB8AzJtjXIol2RoNUNV2QrC8V6sjrLJQXgphqdH7SSj abUobs6wv8n8Eoz3p14kxSC7KH2kRny1+Bi3G6GIhb5oddPrBFDkbFAiClIZEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=iYYiMuqG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=iYYiMuqG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 721CE35CCE X-Spam-Score: -3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: D24tWEmX1iOc --=-oMv4/1jwYXTcsW/NpSiQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op ma 27-09-2021 om 22:09 [+0200]: > Hi, >=20 > On Mon, 27 Sept 2021 at 20:21, pinoaffe wrote: >=20 > > +(define importers (delete-duplicates >=20 > This fixes my first point... >=20 > > + (filter-map (lambda (module) > > + (match (module-name module) > > + (`(guix scripts import ,importer) > > + (symbol->string importer)) > > + ( #t #f))) > > + (all-modules (map (lambda (entry) > > + `(,entry . "guix/sc= ripts/import")) > > + %load-path))))) >=20 > ...and it means it is walking more than needed. Therefore, what is > the performance loss? >=20 > For instance, on my machine and hot cache, it is 4x slower. FWIW, calling ./pre-inst-env guix ... will always be slower than guix ..., because the former will have a longer %load-path (IIRC) and possibly other reasons. Using "guix pull --profile=3D..." "time .../guix import ..." might be a bet= ter test. To only measure the time required for defiing 'importers', wrap delete-dupl= icates in a call to 'time' from (ice-9 time). Greetings, Maxime. --=-oMv4/1jwYXTcsW/NpSiQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVLltBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oFuAP4inWX640bGvGAqeFOSr8Ci4tHW Wdvk/g0kIJkDo1yQTAEAu4A1DDzr/aDiXGkRInPFWhvZxEpxMlWMEmvUgli92Ac= =2WqB -----END PGP SIGNATURE----- --=-oMv4/1jwYXTcsW/NpSiQ--