Subject: bug#44053: ‘xdg-mime-database’ profile hook is slow

From: Luis Felipe <[email-masked]>
Date: Thu, 05 Nov 2020 17:59:59 +0000

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, November 5, 2020 4:10 PM, zimoun <[email-masked]> wrote:

> Hi,
>
> On Thu, 05 Nov 2020 at 14:47, Luis Felipe [email-masked] wrote:
>
> > > Clever workaround! What are now the performances on previous examples
> > > (same profiles and same packages)?
> >
> > In my case there seem to be no improvement (using Guix 5e7cf66fb35780f930ad0bc5fe21ac330df4411d).
> > $ time guix package -i perl --max-jobs=1
>
> [...]
>
> > real 8m38,121s
> > user 0m2,742s
> > sys 0m0,338s
>
> Thanks. But it is hard to conclude because the previous timing is
> missing.

I don't understand, I posted my original timing in https://issues.guix.gnu.org/44053#1 .

> The right experiment should be:
>
> --8<---------------cut here---------------start------------->8---
> old=c73496f433044a76003b33c3855bb35ecd0df87f
> new=5e7cf66fb35780f930ad0bc5fe21ac330df4411d
> guix time-machine --commit=$old -- help
> guix time-machine --commit=$new -- help
>
> drv=$(guix gc -R $(guix gc --derivers $(readlink -f ~/.guix-profile)) |grep xdg-mime-database.drv)
>
> guix package -I |wc -l
> time guix time-machine --commit=$old -- build --check $drv
> time guix time-machine --commit=$new -- build --check $drv
> --8<---------------cut here---------------end--------------->8---

I get this:

yo@gnu: ~❯ guix package -I |wc -l
85

yo@gnu: ~❯ time guix time-machine --commit=$old -- build --check $drv
Actualizando el canal 'guix' del repositorio Git en 'https://git.savannah.gnu.org/git/guix.git'...
Actualizando el canal 'luflac-x' del repositorio Git en [email-masked]:luis-felipe/guix-channel-x.git'...
Se construirá la siguiente extensión del perfil:
   /gnu/store/8hswzn212w7wqlr7cgsvq5v7zjh62chc-xdg-mime-database.drv
construyendo la base de datos MIME XDG...
/gnu/store/8hswzn212w7wqlr7cgsvq5v7zjh62chc-xdg-mime-database.drv construido satisfactoriamente
/gnu/store/i4qslq2517pwkwb5dyivrg8idsjd8n11-xdg-mime-database

real	0m56,245s
user	0m4,324s
sys	0m0,218s

yo@gnu: ~❯ time guix time-machine --commit=$new -- build --check $drv
Actualizando el canal 'guix' del repositorio Git en 'https://git.savannah.gnu.org/git/guix.git'...
Actualizando el canal 'luflac-x' del repositorio Git en [email-masked]:luis-felipe/guix-channel-x.git'...
Se construirá la siguiente extensión del perfil:
   /gnu/store/8hswzn212w7wqlr7cgsvq5v7zjh62chc-xdg-mime-database.drv
construyendo la base de datos MIME XDG...
/gnu/store/8hswzn212w7wqlr7cgsvq5v7zjh62chc-xdg-mime-database.drv construido satisfactoriamente
/gnu/store/i4qslq2517pwkwb5dyivrg8idsjd8n11-xdg-mime-database

real	0m43,272s
user	0m4,214s
sys	0m0,200s