all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Vagrant Cascadian <vagrant@debian.org>,
	Nicolas Graves <ngraves@ngraves.fr>, Csepp <raingloom@riseup.net>
Cc: guix-devel@gnu.org
Subject: Slow guix pull
Date: Wed, 23 Aug 2023 15:48:06 +0200	[thread overview]
Message-ID: <86o7ix3m5l.fsf@gmail.com> (raw)
In-Reply-To: <875y7c3jnc.fsf@wireframe>

Hi,

On Sat, 24 Jun 2023 at 09:33, Vagrant Cascadian <vagrant@debian.org> wrote:

> So, presuming substitutes are available, the main slowness with guix
> seems to be guix pull?

I agree (and for the record, I would add in addition “guix search” too,
another story :-)).


Well, from my understanding about “guix pull”, the first bottleneck is
about “Computing Guix derivation for ...” from build-aux/build-self.scm.

Maybe I misread something and for sure I am probably missing some
details.  On my desktop machine, that part takes 84 seconds, roughly.
From my understanding, it’s because of this procedure,

--8<---------------cut here---------------start------------->8---
(define (proxy input output)
  "Dump the contents of INPUT to OUTPUT until EOF is reached on INPUT.
Display a spinner when nothing happens."
  (define spin
    (circular-list "-" "\\" "|" "/" "-" "\\" "|" "/"))

  (setvbuf input 'block 16384)
  (let loop ((spin spin))
    (match (select (list input) '() '() 1)
      ((() () ())
       (when (isatty? (current-error-port))
         (display (string-append "\b" (car spin))
                  (current-error-port))
         (force-output (current-error-port)))
       (loop (cdr spin)))
      (((_) () ())
       ;; Read from INPUT as much as can be read without blocking.
       (let ((bv (get-bytevector-some input)))
         (unless (eof-object? bv)
           (put-bytevector output bv)
           (loop spin)))))))
--8<---------------cut here---------------end--------------->8---

that is called by,

        ;; Wait for a connection on SOCK and proxy build output so it can be
        ;; processed according to the settings currently in effect (build
        ;; traces, verbosity level, and so on).
        (match (accept sock)
          ((port . _)
           (close-port sock)
           (delete-file node)
           (proxy port (current-build-output-port))))

And that dump is currently on strong annoyance, IMHO.  Because most of
the other derivations can be substituted but this part cannot, again
from my poor understanding.

Note that this part can be very painful.  For example, on my laptop from
2016, it takes ~180 seconds.  Well, 3 minutes for “dumping content”…
that’s a piece of content! :-)

Well, I do not know exactly which kind of content is living at ’port’
and then if ’(current-build-output-port)’ needs all this content.
Therefore, I do not know if something could be trimmed… but I guess
something could be improved here.


Cheers,
simon




  parent reply	other threads:[~2023-08-23 16:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 13:13 Maybe a way to get a few more developpers to work on Guix ? Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2023-06-22 15:37 ` indieterminacy
2023-06-23  7:02 ` pinoaffe
2023-06-23  8:04   ` Fannys
2023-06-23  8:07   ` MSavoritias
2023-06-23  8:15   ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2023-06-24 11:08 ` Csepp
2023-06-24 12:02   ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2023-06-24 16:33     ` Vagrant Cascadian
2023-06-25 16:08       ` Csepp
2023-08-23 13:48       ` Simon Tournier [this message]
2023-06-25 15:53     ` Csepp

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o7ix3m5l.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ngraves@ngraves.fr \
    --cc=raingloom@riseup.net \
    --cc=vagrant@debian.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.