guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix environment --profile with --ad-hoc


From: zimoun
Subject: Re: guix environment --profile with --ad-hoc
Date: Fri, 12 Mar 2021 10:47:04 +0100

Hi Pierre,

On Thu, 11 Mar 2021 at 21:04, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> My only complaint is that it's still a bit slow:
>
> --8<---------------cut here---------------start------------->8---
> time guix environment -C --profile=/my/profile -- exit
>
> real  0m2.372s
> --8<---------------cut here---------------end--------------->8---
>
> Same without `-C`.
>
> In comparison,
>
> --8<---------------cut here---------------start------------->8---
> time env -i $(which bash) --norc --noprofile -c 'source nyxt/etc/profile && 
> exit'
>
>
> real  0m0.004s
> --8<---------------cut here---------------end--------------->8---

You are not comparing apple to apple. :-)


> Is there anything we can do to speed this up?

We already had this discussion. :-)

See the thread: <https://yhetil.org/guix/87o8j35ncu.fsf@ambrevar.xyz>

Compared to the previous discussion, the --profile is a good improvement
since it by-passes the computations of derivations and profiles and the
time of the container part still is less than 0.2s on my machine, which
is acceptable, as you are saying. :-)


Therefore, IIUC, your question is: how to speed up the call of Guix
commands?  Right?

For instance, cold cache:

--8<---------------cut here---------------start------------->8---
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time guix environment --help >/dev/null

real    0m1.730s
user    0m0.845s
sys     0m0.198s
--8<---------------cut here---------------end--------------->8---


BTW, what about “guix run” which is faster, right?


Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]