unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: swedebugia@riseup.net
Cc: guix-devel <guix-devel@gnu.org>
Subject: ‘package-transitive-supported-systems’ is slow
Date: Mon, 02 Jul 2018 15:36:37 +0200	[thread overview]
Message-ID: <87in5xhi8q.fsf@gnu.org> (raw)
In-Reply-To: <8a4e9b4cb730094a84ef3ff29233c6dd@riseup.net> (swedebugia's message of "Sat, 30 Jun 2018 08:20:48 -0700")

(+Cc: Mark, who’s looked at this part of the code before.)

swedebugia@riseup.net skribis:

> I would like guix package -A/s to be faster.
> There it takes >3s every time I run the command.

On closer inspection, ‘package-transitive-supported-systems’ is
responsible for most of the overhead you’re seeing here.

On my laptop, if I define it like this in (guix packages):

  (define package-transitive-supported-systems
    (const '("x86_64-linux")))

then ‘guix package -A’ drops from 1.5s to 0.6s.

The main cost is calling ‘package->bag’, which amounts to doing half of
the work towards computing a package’s derivation.  This particular
change was introduced in 9bf3ced06c42700d6c83ce3a0eda244798104618 so
that ‘package-transitive-supported-systems’ would account for implicit
inputs.

I can’t think of any simple way to optimize it without changing these
semantics.  Mark?

Ludo’.

      parent reply	other threads:[~2018-07-02 13:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 15:20 guix package is slow swedebugia
2018-06-30 15:25 ` Pierre Neidhardt
2018-07-01 15:34   ` Maxim Cournoyer
2018-07-01 18:50     ` Pierre Neidhardt
2018-07-01 19:33       ` Maxim Cournoyer
2018-07-01 19:41         ` Pierre Neidhardt
2018-07-01 20:18           ` Maxim Cournoyer
2018-07-01 20:32             ` Pierre Neidhardt
2018-07-02  1:04           ` Oleg Pykhalov
2018-07-02 14:55             ` Maxim Cournoyer
2018-07-02 20:28               ` Alex Kost
2018-07-03 17:06                 ` swedebugia
2018-07-03 19:39                 ` Ludovic Courtès
2018-07-08 16:05                 ` Maxim Cournoyer
2018-07-09 16:42                 ` George Clemmer
2018-07-10  2:45                   ` Oleg Pykhalov
2018-07-02 20:39           ` Alex Kost
2018-07-01 15:32 ` Maxim Cournoyer
2018-07-02 10:20   ` Ludovic Courtès
2018-07-02 15:48     ` Maxim Cournoyer
2018-07-02 13:36 ` Ludovic Courtès [this message]

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=87in5xhi8q.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=swedebugia@riseup.net \
    /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).