guix-devel
[Top][All Lists]
Advanced

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

Performance improvements


From: Ludovic Courtès
Subject: Performance improvements
Date: Mon, 14 Oct 2019 23:39:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello Guix!

I just wanted to share that recent commits have improved the performance
of ‘package-derivation’ and related operations quite a bit:

  8f417ed280 gnu: commencement: Further optimize the package object graph.
  f618134e4c build-system/gnu: 'package-with-explicit-inputs' uses 
'package-mapping'.
  dab669e075 gnu: ld-wrapper: Memoize.
  099dbc4fd3 gnu: Improve memoization of 'package-with-bootstrap-guile'.
  99b73d0f0c gnu: commencement: Reduce the graph of package objects.
  9a45a24f7f gnu: Remove unnecessary uses of 'package-with-bootstrap-guile'.

What these commits do is that they greatly reduce the graph of <package>
objects built in ‘commencement.scm’.  As a result, there’s much less
work to do, less code to run, less stuff to memoize, all that.  :-)

Before these changes, if you’d run, say:

  guix graph -e '(@@ (gnu packages commencement) gnu-make-final)'

you’d see the <package> graph was huge and had a weird shape.  Indeed,
many parts were duplicated as a consequence of graph rewriting.  That’s
not news, but it became more visible with the reduced binary seed
boostrap, which adds quite a few nodes and edges.

The commit logs have more details, but the take-away is:

--8<---------------cut here---------------start------------->8---
$ time /var/guix/profiles/per-user/ludo/current-guix-109-link/bin/guix build 
libreoffice -nd
/gnu/store/7whsss0gn7h4dqvz627sq3i4cb1qlc1v-libreoffice-6.1.5.2.drv

real    0m3.238s
user    0m3.693s
sys     0m0.047s
$ time guix build libreoffice -nd
/gnu/store/8drmbhsrayr2j5lkvrwq37rg8g06hgsw-libreoffice-6.1.5.2.drv

real    0m2.142s
user    0m2.323s
sys     0m0.082s
$ guix describe
Generacio 110   Oct 14 2019 08:43:33    (nuna)
  guix bd04fe8
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: bd04fe878627a14533d908ccdf5b906050d6e0a4
--8<---------------cut here---------------end--------------->8---

I think we need to aim for 1s, but that’s already a good step.

Ludo’.



reply via email to

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