From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2OrAF3Gu8WB2SgEAgWs5BA (envelope-from ) for ; Fri, 16 Jul 2021 18:06:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OIdpE3Gu8WDlKQAAbx9fmQ (envelope-from ) for ; Fri, 16 Jul 2021 16:06:09 +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 20BD82BEB4 for ; Fri, 16 Jul 2021 18:06:09 +0200 (CEST) Received: from localhost ([::1]:52874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4QLo-00065R-5c for larch@yhetil.org; Fri, 16 Jul 2021 12:06:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4QLi-00061v-W7 for guix-patches@gnu.org; Fri, 16 Jul 2021 12:06:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m4QLi-0005CH-Ny for guix-patches@gnu.org; Fri, 16 Jul 2021 12:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m4QLi-0003NY-FG for guix-patches@gnu.org; Fri, 16 Jul 2021 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49421] [PATCH] profiles: Optimise 'fonts-dir-file'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Jul 2021 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49421 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 49421@debbugs.gnu.org Received: via spool by 49421-submit@debbugs.gnu.org id=B49421.162645156112981 (code B ref 49421); Fri, 16 Jul 2021 16:06:02 +0000 Received: (at 49421) by debbugs.gnu.org; 16 Jul 2021 16:06:01 +0000 Received: from localhost ([127.0.0.1]:52216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4QLg-0003NJ-MF for submit@debbugs.gnu.org; Fri, 16 Jul 2021 12:06:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m4QLf-0003N6-Fj for 49421@debbugs.gnu.org; Fri, 16 Jul 2021 12:06:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34184) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4QLZ-00056F-QE; Fri, 16 Jul 2021 12:05:53 -0400 Received: from vpn-0-27.aquilenet.fr ([2a0c:e300:4:27::]:38218 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4QLZ-0004vh-AM; Fri, 16 Jul 2021 12:05:53 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6myoyl5.fsf@gnu.org> <5ec75ed429133cbc73dc7916959302033fe70a13.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Messidor 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: Fri, 16 Jul 2021 18:05:49 +0200 In-Reply-To: <5ec75ed429133cbc73dc7916959302033fe70a13.camel@telenet.be> (Maxime Devos's message of "Thu, 15 Jul 2021 18:28:16 +0200") Message-ID: <87pmviw8f6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (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: 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=1626451569; 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=9XLnNBEbUgbb+4BjxZgN4H+9f2pVClfDuPR0BRYVKo4=; b=inNDaRQhNu6/o3aEDaQQJVRh60OnWV6ZvEmxjSjK1V5lj8ofFvSKdTntMx1/+rkPRmAb7M C+Dl/ctui4Jl9xBzR8Yj6S1IneHH9DVwTvqpIJvr07hJoVuILwV/1NKMcyPtLUL/iAUQCk OTWsriy/Q+cTEs1Q7MopEoih0Gu/FZ0DjfSoa5Tccb0GkIRQjzoqBAUcGfHdZZm5uob/Cr GjTwjUfq/mBEti9qcCxtl0Ep73ic7384h42Yz6RDMimP2qwC6+2poaRt76PsI/K9EHKedw heEgCr/2lOCHaM8lCpA/PiEL2kUYDvb6/pbZTZlXUPxBCTrpi7gndjpCRB10tg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626451569; a=rsa-sha256; cv=none; b=M8sejfZSuM/hgycWOM1EfO0LpMk2TlK2pGJy2Z/J93C+48kxu+BcczxuTW3Wbnku6SNfhr VHDCehAJ93L+GD/dDmTjut3+10Dw/AhCYcbxJyI4XirHUztGn+Gh6u8Vy5eBqXzwuD5nA2 GV/ONviydnXEHDi2TENTJOs6ldVm1++RsRTD64ldpH2vSFcjb95+l4kQGmj0KFfuAsig90 tA0RTvIhMbuTSxbqFTzMjCDuxVjpkUs0kqjr4peOqUhaSRwIVY1P7eEVanJ3/53aNg1ckw /8muxhUFr0ZLxedtLJIQ22x7C40r7aXtoSiMkogYsLye70GLUvSIMkJdg6WdyQ== 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 guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 20BD82BEB4 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: nWCDXtl4OYol Hi! Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op wo 07-07-2021 om 18:52 [+0200]: [...] >> Do you know what=E2=80=99s taking time in the =E2=80=98fonts-dir-file=E2= =80=99 hook? >> (On my x86_64 laptop with SSD, it runs in 4.4s on a cold cache for a >> profile containing 14 font packages, and in 1.2s on a warm cache.) > > I noticed =E2=80=98building fonts directories=E2=80=99 was taking long (9= minutes or so, > when using "guix package -r two packages that don't have fonts"), Ouch, that=E2=80=99s way more than what I=E2=80=99m observing. :-) Do you= have a manifest or package list to reproduce that? Were those timings on a spinning disk? > so I took the opportunity to "strace" the process, though I was a little = late. > Some statistics: > > % time seconds usecs/call calls errors syscall > ------ ----------- ----------- --------- --------- ---------------- > 27,14 1,676551 117 14297 rename > 19,60 1,211012 13 90829 8 lstat > 18,34 1,133182 63 17787 15 statx > 11,80 0,729185 51 14297 link [...] > statx(AT_FDCWD, "/gnu/store/.links/[...]my", AT_STATX_SYNC_AS_STAT|AT_SYM= LINK_NOFOLLOW, 0, {stx_mask=3DSTATX_ALL|> > lstat("/gnu/store/.links/[...]my", {st_mode=3DS_IFLNK|0777, st_size=3D124= , ...}) =3D 0 > lstat("/gnu/store/[...]nm-fonts-dir/share/fonts/mathjax/HTML-CSS/TeX/png/= AMS/Regular/283", {st_mode=3DS_IFDIR|0555, st_size=3D4112, ...> > chmod("/gnu/store/[...]nm-fonts-dir/share/fonts/mathjax/HTML-CSS/TeX/png/= AMS/Regular/283", 040755) =3D 0 > getpid() =3D 26371 > > > It seems like =E2=80=98duplication=E2=80=99 is taking a lot of time! It surely does but we need more data before we can draw a conclusion (the system time above accounts for ~6 seconds, not 9 minutes). Anyway, it looks like we should be able to push most of the I/O work to packages. Let=E2=80=99s see! Thanks, Ludo=E2=80=99.