From: "Ludovic Courtès" <ludo@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>,
Luis Felipe <luis.felipe.la@protonmail.com>,
Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: ‘xdg-mime-database’ profile hook is slow
Date: Wed, 21 Oct 2020 11:49:28 +0200 [thread overview]
Message-ID: <874kmn9adz.fsf_-_@gnu.org> (raw)
In-Reply-To: <87v9f7gspm.fsf@dismail.de> (Joshua Branson's message of "Sun, 18 Oct 2020 16:55:01 -0400")
Hi,
Joshua Branson <jbranso@dismail.de> 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’t noticed, but indeed the “XDG MIME database” steps takes a
while. For my “big” 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-database.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’s worse on a cold cache:
--8<---------------cut here---------------start------------->8---
$ drv="$(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-database.drv
/gnu/store/q25yv8hil0281x7zm25l259xvjfwwrsx-xdg-mime-database
real 0m5.872s
user 0m0.314s
sys 0m0.102s
--8<---------------cut here---------------end--------------->8---
And it’s probably worse on spinning disks? What timings do you get?
We should profile this hook and see if it’s the ‘union-build’ call
that’s taking time or the ‘update-mime-database’ invocation.
‘union-build’ tends to be very I/O-intensive.
Thanks,
Ludo’.
next prev parent reply other threads:[~2020-10-21 9:49 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 12:59 Removing/replacing “Guix in action” video from the home page? Ludovic Courtès
2020-10-12 14:31 ` Luis Felipe
2020-10-13 1:17 ` Joshua Branson
2020-10-13 17:19 ` Bonface M. K.
2020-10-13 20:59 ` Joshua Branson
2020-10-14 0:58 ` Bonface M. K.
2020-10-13 20:39 ` Ludovic Courtès
2020-10-14 0:14 ` Luis Felipe
2020-10-14 20:43 ` Joshua Branson
2020-10-16 10:27 ` Ludovic Courtès
2020-10-16 10:36 ` zimoun
2020-10-16 15:26 ` Luis Felipe
2020-10-18 3:42 ` Maxim Cournoyer
2020-10-18 11:13 ` zimoun
2020-10-18 20:55 ` Joshua Branson
2020-10-21 9:49 ` Ludovic Courtès [this message]
2020-10-21 10:23 ` ‘xdg-mime-database’ profile hook is slow zimoun
2020-10-27 23:14 ` Joshua Branson
2020-10-28 21:48 ` Luis Felipe
2020-10-28 22:38 ` zimoun
2020-10-29 12:35 ` Luis Felipe
[not found] ` <87sg9sm2qf.fsf@gnu.org>
2020-11-02 12:53 ` bug#44053: " Ludovic Courtès
2020-11-02 14:04 ` Ludovic Courtès
2020-11-03 23:32 ` zimoun
2020-11-05 14:47 ` Luis Felipe
2020-11-05 16:10 ` zimoun
2020-11-05 17:59 ` Luis Felipe
2020-11-06 12:55 ` zimoun
[not found] ` <87blga3l7e.fsf@gnu.org>
2020-11-06 13:57 ` Luis Felipe
2020-11-08 16:31 ` Ludovic Courtès
2020-11-06 9:12 ` Ludovic Courtès
2020-10-16 20:00 ` Removing/replacing “Guix in action” video from the home page? jbranso
2020-10-16 21:04 ` Luis Felipe
2020-10-28 0:55 ` Joshua Branson
2020-10-28 12:59 ` Tobias Geerinckx-Rice
2020-10-28 21:46 ` jbranso
2020-10-31 21:56 ` Ludovic Courtès
2020-11-01 0:50 ` jbranso
2020-11-03 22:30 ` zimoun
2020-10-16 19:57 ` jbranso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kmn9adz.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=luis.felipe.la@protonmail.com \
--cc=maxim.cournoyer@gmail.com \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).