From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GPZ8Fa1NKWeUbQEA62LTzQ:P1 (envelope-from ) for ; Mon, 04 Nov 2024 22:41:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GPZ8Fa1NKWeUbQEA62LTzQ (envelope-from ) for ; Mon, 04 Nov 2024 23:41:49 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=JIwLQbiB; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730760109; a=rsa-sha256; cv=none; b=av0ltQIiUduLTquwHgFBWhdOwBgDf0PlFmTqTjcvYOcaNSr78Z6LRfDI1lv5SaQL2AFoYQ Z2VIgFFMYLLzITDBoELf8tQJ+KwtmxQ68CMUxEfCESUPynF5UsQCLrCXzO2foGD14OQ2hq Y0LtIL2IjE9tc/btk1IgfC3ZmKDwdzsq8T0S855O0LaSiRAhME+EGhrAaet0nhJjDPr7Z/ oZWR929u2z9r/+aq2FnXAC8PiVcUr6JpC1jmsPjQMRI+JQ2QExExReopJRmiF1/986Of1L 8rg+Doa5brTzAaFN7KTsWrXpKe/qFWMigNlXwKnBN1c26QHg5rV64tSnWWEq4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=JIwLQbiB; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730760109; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9icweER+gx6HNpkKMvnOhhIKQpZxkJLFzR2DcUNbXfQ=; b=gKvyCsN4DyaIvOpzUMvugBur2NP2aLBJZKQ2OyY0goadCutQ4WOn5zdWAvDFPNX5CGLruf hdEWUOBvV6swsz0SeGGooxbqHEZ2euTkNKl6HCYWChztc3u3xvE99Ep2X8BjfSY/J3DA+K GiVPlkDrYX1bWv0br0OhHyfCI0FdWIP5WDcoWx++4j4MLSytaD+0EiUvfVTKDGQEOX2nba dceXpSmKpuF037wR6oWzk/LFvK1GLA4A0BQz4yQAnqjmMFLlXcaP48EUsm5JoXAuIMTxTq QSIAfOO5U+ASUW2Hz1FN8E5YoEfgvyVKvPlxmdDG4l05z1HAcTY9Z8RQ80aL6A== 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 233A01DC79 for ; Mon, 04 Nov 2024 23:41:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t85l4-0007Qy-2Q; Mon, 04 Nov 2024 17:41:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t85l3-0007Qq-9Q for guix-devel@gnu.org; Mon, 04 Nov 2024 17:41:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t85l3-00060J-1i; Mon, 04 Nov 2024 17:41:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=9icweER+gx6HNpkKMvnOhhIKQpZxkJLFzR2DcUNbXfQ=; b=JIwLQbiBK3w6mZNrl8i2 zMXNcelXrZntqoaypTyh5AZ66n0hIYFTZW1Ut1kmD3Cnov/EMroePLXm0n1fIAjs5eCfiVmXMkvJa ZDtGnXJPg/wv4OBzl7PIk+QxVzaRgYqnFg8ABbGfQMd6aVx8Hw4nsJxch6oQhFadmApkmfkmQN6PG smamWBMJjCCt+5+N6H0cd7xWoUAk5SRQm4PxBf02flHnXk+QFq0D/8FheBP6cRuFvhak4ncK74xC3 fL+4EmxYNvKEHau3zuWnvSHRRDrf9QJKR409E+xhszO1uDjA56sD5V0/me5XRxS3SUegvLaOcs9/H r7SI3ZliVorheQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Evan Cooney Cc: guix-devel@gnu.org Subject: Re: Some code in guix-package* is somehow reached multiple times without any clear reason? In-Reply-To: (Evan Cooney's message of "Sun, 3 Nov 2024 20:46:23 +0000") References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Brumaire an 233 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de l'Endive 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: Mon, 04 Nov 2024 23:41:09 +0100 Message-ID: <87a5ee39mi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.28 X-Spam-Score: -4.28 X-Migadu-Queue-Id: 233A01DC79 X-Migadu-Scanner: mx10.migadu.com X-TUID: dFc9SN5Xau3t Hi Evan, Evan Cooney skribis: > I was profiling each expression in guix-package* trying to find which > expression takes the most time to evaluate when I noticed the profiling > command displaying data multiple times despite wrapping an expression that > looks like it's only evaluated one time. Here is the code: > https://paste.debian.net/1334468/. I checked the definition of > call-build-hander and only invokes its thunk argument one time, so I have > no idea what's going on here. Could someone explain why this might be > happening? > > Here is the output produced when installing librewolf: > https://paste.debian.net/1334470/ You pastes have expired; maybe have it inline next time? =E2=80=98with-build-handler=E2=80=99 etc. is a mechanism used for grafts an= d described in this post: https://guix.gnu.org/en/blog/2020/grafts-continued/ In the presence of grafts, the =E2=80=9Cbuild handler=E2=80=9D may be calle= d several times, indeed. Ludo=E2=80=99.