From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aGKnBjUEkF8xWwAA0tVLHw (envelope-from ) for ; Wed, 21 Oct 2020 09:49:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gJJjAjUEkF8ecQAAbx9fmQ (envelope-from ) for ; Wed, 21 Oct 2020 09:49:41 +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 6873F9409F2 for ; Wed, 21 Oct 2020 09:49:40 +0000 (UTC) Received: from localhost ([::1]:44792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVAkV-0008T4-Cr for larch@yhetil.org; Wed, 21 Oct 2020 05:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVAkN-0008Sy-FZ for guix-devel@gnu.org; Wed, 21 Oct 2020 05:49:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45305) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVAkN-0003a0-5h; Wed, 21 Oct 2020 05:49:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43116 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVAkM-0005xb-Ot; Wed, 21 Oct 2020 05:49:30 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: =?utf-8?Q?=E2=80=98xdg-mime-database=E2=80=99?= profile hook is slow References: <87o8l7pple.fsf@gnu.org> <87h7qxhncq.fsf@gnu.org> <3aQjRn5jGhxHrhAmuB3MfLRjSxAp3PVFu1vL7_GV1ucGibzYURCtMqHN4oeyGb5xez2xYM3loEJIECrVdnAGZBZvf0N1bGXN-80mO6Ymr6k=@protonmail.com> <87sgagv8qt.fsf@dismail.de> <87o8l279eb.fsf@gnu.org> <4JD1z15e92ccv6WXcMS5IiNJnDwR6P3bkIwtPWLUPYDVCUHYDoekpifyj3GQtnEq1LCKftbL-FV1hp162A1mid2EmjLMbWlxQ05aE9vGyf0=@protonmail.com> <87v9f842uu.fsf@gmail.com> <87v9f7gspm.fsf@dismail.de> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?utf-8?Q?Vend=C3=A9miaire?= 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: Wed, 21 Oct 2020 11:49:28 +0200 In-Reply-To: <87v9f7gspm.fsf@dismail.de> (Joshua Branson's message of "Sun, 18 Oct 2020 16:55:01 -0400") Message-ID: <874kmn9adz.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) 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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel , Luis Felipe , Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: At2drhhPwc3C Hi, Joshua Branson skribis: > I don't want to complain (because I'm probably not going to be able to > fix any issues that I spot), but it does seem to take a while for me to > install packages, at least the XDG mime step. It's not a huge issue for > me. I just realize that installing packages takes more time . :) But > if we are calling this an "issue", your suggestion to use numerous > packages seems like a "work-around" rather than a "fix". Just having identified which part is low is already a step forward. :-) I hadn=E2=80=99t noticed, but indeed the =E2=80=9CXDG MIME database=E2=80= =9D steps takes a while. For my =E2=80=9Cbig=E2=80=9D user profile, on an SSD, it takes more= than 4s: --8<---------------cut here---------------start------------->8--- $ time guix build --check $(guix gc -R $(guix gc --derivers $(readlink -f ~= /.guix-profile)) |grep xdg-mime-database.drv) The following profile hook will be built: /gnu/store/dhcv26m2k3kyx92wf9palp8byhblgjrr-xdg-mime-database.drv building XDG MIME database... successfully built /gnu/store/dhcv26m2k3kyx92wf9palp8byhblgjrr-xdg-mime-dat= abase.drv /gnu/store/q25yv8hil0281x7zm25l259xvjfwwrsx-xdg-mime-database real 0m4.241s user 0m1.689s sys 0m0.101s $ guix package -I |wc -l 296 --8<---------------cut here---------------end--------------->8--- It=E2=80=99s worse on a cold cache: --8<---------------cut here---------------start------------->8--- $ drv=3D"$(guix gc -R $(guix gc --derivers $(readlink -f ~/.guix-profile)) = |grep xdg-mime-database.drv)" $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time guix build --check "$drv" The following profile hook will be built: /gnu/store/dhcv26m2k3kyx92wf9palp8byhblgjrr-xdg-mime-database.drv building XDG MIME database... successfully built /gnu/store/dhcv26m2k3kyx92wf9palp8byhblgjrr-xdg-mime-dat= abase.drv /gnu/store/q25yv8hil0281x7zm25l259xvjfwwrsx-xdg-mime-database real 0m5.872s user 0m0.314s sys 0m0.102s --8<---------------cut here---------------end--------------->8--- And it=E2=80=99s probably worse on spinning disks? What timings do you get? We should profile this hook and see if it=E2=80=99s the =E2=80=98union-buil= d=E2=80=99 call that=E2=80=99s taking time or the =E2=80=98update-mime-database=E2=80=99 in= vocation. =E2=80=98union-build=E2=80=99 tends to be very I/O-intensive. Thanks, Ludo=E2=80=99.