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 ms0.migadu.com with LMTPS id YFJIFBhzVWGGMQEAgWs5BA (envelope-from ) for ; Thu, 30 Sep 2021 10:19:36 +0200 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 sOXrDxhzVWEDBwAAB5/wlQ (envelope-from ) for ; Thu, 30 Sep 2021 08:19:36 +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 8426049A8 for ; Thu, 30 Sep 2021 10:19:35 +0200 (CEST) Received: from localhost ([::1]:37598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVrHy-0004yf-KD for larch@yhetil.org; Thu, 30 Sep 2021 04:19:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVrHS-0004y0-R7 for guix-patches@gnu.org; Thu, 30 Sep 2021 04:19:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVrHR-00067V-Vy for guix-patches@gnu.org; Thu, 30 Sep 2021 04:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVrHR-00062t-NT for guix-patches@gnu.org; Thu, 30 Sep 2021 04:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50755] [PATCH v3] import: Generate list of importers based on available modules Resent-From: pinoaffe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Sep 2021 08:19: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: Maxime Devos Cc: 50755@debbugs.gnu.org, zimoun Received: via spool by 50755-submit@debbugs.gnu.org id=B50755.163298988423168 (code B ref 50755); Thu, 30 Sep 2021 08:19:01 +0000 Received: (at 50755) by debbugs.gnu.org; 30 Sep 2021 08:18:04 +0000 Received: from localhost ([127.0.0.1]:51406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVrGV-00061c-S4 for submit@debbugs.gnu.org; Thu, 30 Sep 2021 04:18:04 -0400 Received: from mail.cock.li ([37.120.193.124]:41668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVrGQ-000611-9O for 50755@debbugs.gnu.org; Thu, 30 Sep 2021 04:18:01 -0400 References: <87tuibh43w.fsf@airmail.cc> <87mtnxswwq.fsf@airmail.cc> <4ddbb2adfa86c9ed2e1cf01ad5c1d0129553cbae.camel@telenet.be> <87k0j0hii3.fsf@airmail.cc> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail; t=1632989870; bh=lx0S0EwYK6ofm4zpBxtGVeutY+63LqEAw92EUkcq0Uk=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=p9GnX5BWRmvE+v2VwDAuvidt6AllVDpTbVyCTJWhTItwsGPKupi8jWtSWp/91KZMo Tp8wfYRfQi2PxTAbqmUYWI4ppI7DBbW52fgqrNIwkuZYmLkTyiU9hTS0RBT5DmfPlc I0dH9N1U5SsL5DQKal4BGQr2ntaAsZnwWc39XDxKrmojvjJ74I1X3yKy9YJ6R97jXS dZNvkN9WAu2LZXoLE0k5iAMyHtrij6pDn4Gvd0Upp5DQHonOD8CdtwSm1SFihyBClW ceyajeQ9Ql0AVG1ZMsEtLYkwdsPvMaKLb3KBxD208PfCJX/l0MhFMNSyPyz3sCQIGn hflSYiRiWk7iA== User-agent: mu4e 1.4.15; emacs 27.2 From: pinoaffe In-reply-to: Date: Thu, 30 Sep 2021 10:17:48 +0200 Message-ID: <87r1d6zdcj.fsf@airmail.cc> MIME-Version: 1.0 Content-Type: text/plain 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=1632989975; 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=PJC1VD2+EkdofBwjk7WTFRLozz6I0OtAMgiXUKJG0Dw=; b=TpW85iXhLgjqU0hR+Byz5aqLKB22z+Lukn736DG+aWjqdYwtsxqIt2h3RfZ25tsRpPH7Bs 7Sb/5a/U1hX8LQLgTQt2gUDmz994jGE4TFjjJSAnM+0Hk8AlTNw5vYZTvamGRBx8mVGFDj kPklKqYoHR4qBTVDgQXIwyMZRXdGLf62O3X8C8xHsgQbRIwKzX6djX/XKekJdG/ZfaEOQG nhjcK6bavjW0BssJ1UpL9jRrqZP23m0z81C6be1xkV/oVWePZgJ7D5IpOTObPzBhIf3JU7 EwyQWMeOE61xbpMbCOIj6ZpauT0MdoRhVODKAiELq8vV/0eLfd78KjKoSGp8aA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632989975; a=rsa-sha256; cv=none; b=gp3MuU3g8A0QciZXS7Dr7MVc3GmEYIJkBL3T9UES2bRX4r2QoKirtnw9fhqKMSbe5REtYF Ltn+zILV/EGhpDckX3eKkmgbrU4daD0lR4/jFKi5jDVOJjCfJYvr4QnJEXamKH1JcMlq2R 5bLRbpBnBb0vWCYrandIRjJpwfpWWrJ0R+kes25CsVUkzfS9smzZ44qMmt12uAjqmpNEgc HGwdOlCibS15IZoom+/8WFO45XedkkP+emkl0jN/X+p9yRAMPs6iLSHBwzmxQ5yQTy2W7Z J2vY5NXPeInEL0bXnZC9xMSKloiEnClbxXl7YGbqjxDAiVFCM/6uVgNgJHddCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=airmail.cc header.s=mail header.b=p9GnX5BW; 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: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=airmail.cc header.s=mail header.b=p9GnX5BW; dmarc=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: 8426049A8 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7w9mPGnFA+Pq Maxime Devos writes: > These numbers turn out to be misleading, because 'scheme-modules' > (indirectly called from all-modules) calls 'resolve-interface' on every module > name. For a module name, the first 'resolve-module' incurs disk I/O and some > CPU for loading the module, but the second 'resolve-module' on the same module > name would be free, as the module is already loaded. okay, the first incantation of (time (for-each (lambda (_) (delete-duplicates (filter-map (lambda (module) (match (module-name module) (`(guix scripts import ,importer) (symbol->string importer)) (#t #f))) (all-modules (map (lambda (entry) `(,entry . "guix/scripts/import")) %load-path))))) (iota 1))) on a "fresh" guix repl on my system results in clock utime stime cutime cstime gctime 1.28 0.76 0.13 0.00 0.00 0.16 which is indeed a significant amount of time, though I don't think it'd be much of an issue considering that it's not likely that users will run lots of `guix import` shell commands in rapid succession. kind regards, pinoaffe