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 jrTJBiaD8GDfmQAAgWs5BA (envelope-from ) for ; Thu, 15 Jul 2021 20:49:10 +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 YKTWASaD8GDsPAAAB5/wlQ (envelope-from ) for ; Thu, 15 Jul 2021 18:49:10 +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 73C77154CC for ; Thu, 15 Jul 2021 20:49:09 +0200 (CEST) Received: from localhost ([::1]:46224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m46Pz-0008UF-9n for larch@yhetil.org; Thu, 15 Jul 2021 14:49:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m46Pv-0008U4-3F for guix-patches@gnu.org; Thu, 15 Jul 2021 14:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m46Pu-0005dV-Qs for guix-patches@gnu.org; Thu, 15 Jul 2021 14:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m46Pu-0006Hi-Eh for guix-patches@gnu.org; Thu, 15 Jul 2021 14:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49421] [PATCH] profiles: Optimise 'fonts-dir-file'. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Jul 2021 18:49: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 49421@debbugs.gnu.org Received: via spool by 49421-submit@debbugs.gnu.org id=B49421.162637490524113 (code B ref 49421); Thu, 15 Jul 2021 18:49:02 +0000 Received: (at 49421) by debbugs.gnu.org; 15 Jul 2021 18:48:25 +0000 Received: from localhost ([127.0.0.1]:49725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m46PJ-0006Gr-4p for submit@debbugs.gnu.org; Thu, 15 Jul 2021 14:48:25 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:57740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m46PF-0006Gf-Ft for 49421@debbugs.gnu.org; Thu, 15 Jul 2021 14:48:24 -0400 Received: from butterfly.local ([213.119.236.63]) by michel.telenet-ops.be with bizsmtp id VWoJ2500L1Nl63106WoKyU; Thu, 15 Jul 2021 20:48:20 +0200 Message-ID: <369206a276e225478ed1bbce0b883255dccef369.camel@telenet.be> From: Maxime Devos Date: Thu, 15 Jul 2021 20:48:09 +0200 In-Reply-To: <5ec75ed429133cbc73dc7916959302033fe70a13.camel@telenet.be> References: <87a6myoyl5.fsf@gnu.org> <5ec75ed429133cbc73dc7916959302033fe70a13.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-CbfvmF6qgDJPbAHSoYqp" 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=1626374900; bh=cLsUGn6jBBuJ8JOaVGkzFELFr1c87eH+cEfbFVAY2ZU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=bOJS2+qoZ0FyP80wxOVeS3W6rzhikMdcvU/hk5tcsjVcZ+puHIQXA2jz+JXaede1l BiCnzCRfl3CJn3gYpZJXrVkRgIzhHCxEBfHrJsV+CWZ5LxhxgJ++sPotuve8vCFErY 8j97b3LcsmZVPzRjUblSZRoykkPyat2KMXHNvDg9LV5HbR9z9m841z9uM+AcSFyv71 8aAXGVSBzfKpkySe7IVF4nbURem4DTH6vteiPs+FzHUF5vRoSJ4gDD8w6uKSDsxG5J gI9kGIPrgd2OKWzkNYbVkjKgO+++lW5hUUbUWkS7QUQuU9WXsO5b7ZP0zgMgSrmaNE mEvNPC0dy9s1Q== 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=1626374949; 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=cLsUGn6jBBuJ8JOaVGkzFELFr1c87eH+cEfbFVAY2ZU=; b=TL/NggarEOaEFdxZ9vwb4Qt1pWU3B1ahnu6l/asoDqS92mjLdq+r8Pvx3h3tlauO4qttSK hMD65QiF9NUHMJvYiTh6LSBKPR0zPAPEA9HPpStF0GY/mm9AkXvrIilnuIJWQlKN2E3J5f QbQgQYzvJfgVEsnGCN7Yaze6C80d1quwh4qlABy3qGvA61UOf3uQlz+lX5aGqmaiywMFlF Y4jW6IqacQbexcblPUY7ImRX1BPX44IONfGUvGz6GhRkZsAoSAtK1137NWIfqRSCWoNASM Tycgh6qf0tGmzueChHvv/yVznSsX11cE7tn81n/JyWLWk6V2f8oZFeJzYu9slg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626374949; a=rsa-sha256; cv=none; b=uGG1730gWG9tF5/vSkJl7G75b49aH13QJMG8EAPCeOM8O7qo8Uit2OMdLADz4XW4K91wiy kzrKrlDMj7sG3Z+AF1ZV80xaowpX4uXUDCr/ySRkavFQvRN3VeEx0k2xv3SNoQlnHuLrW9 uqOKHLB0jboPdTgahgeGYT0IBOjgaE36y+9Zr9U9CH9Ws4enlZTXbCCiEZDvll5iKjCfaS 8D+08pQrsYSuDIQVVfFBqWKfiTeXKo73IdE4yLEqwn7sevXCcWKy6p8XrOhkFaq8v/qms6 LpZEs/MJx6GX9gibHoQu7R/Ym/yb+PkfBZri3dY5thgW60i6DIrgLYfE9hmoIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=bOJS2+qo; 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.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=bOJS2+qo; 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: 73C77154CC X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: I1UnCJG8KAU2 --=-CbfvmF6qgDJPbAHSoYqp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > (Also, the manual annotation would go away once 'gs-fonts' is renamed. > I'll run "echo /gnu/store/*/share/fonts > atchie-fonts" though to see > if there are other packages not following the convention.) Scheme code: (use-modules (ice-9 ftw) (srfi srfi-1)) (define (has-share/fonts? o) (file-exists? (string-append "/gnu/store/" o "/share/fonts"))) (define t (scandir "/gnu/store" has-share/fonts?)) (define t2 (map (lambda (x) (substring x 33)) t)) (define t3 (delete-duplicates t2)) (define (fonty? x) (string-prefix? "font-" x)) (partition (lambda (x) (string-prefix? "font-" x)) t3) Output on my system: $1 =3D ("font-alias-1.0.3" [...]) $2 =3D ("fonts-dir" "profile" "mate-1.24.1" "denemo-2.5.0" "mate-1.24.0" "g= s-fonts-8.11") "fonts-dir", "profile" and "gs-fonts" are expected. "mate" uses "union-build" and has "font-cantarell" in 'inputs'. Apparently "denemo" has some font files as well. Something will need to be figured out for these cases, if the approach of my patch is followed. I think it's better to optimise 'union-build' and the store deduplication code though (maybe subdirectories can be process concurrently, to maximise = I/O utilisation?). That should improve performance outside the 'fonts-dir-file'= hook as well. Greetings, Maxime. --=-CbfvmF6qgDJPbAHSoYqp 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+4iGRcl7gUCYPCC6RccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sFIAQCihDN5aMkr4uoKyseSCramBWrf 1uRwf2AHfKk6o2Qx5AD/TJygfcxSi/UZQimJKTtBuduiomtY1ouxpVaqkYDrkwY= =iA5C -----END PGP SIGNATURE----- --=-CbfvmF6qgDJPbAHSoYqp--