From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Performance improvements Date: Mon, 14 Oct 2019 23:39:28 +0200 Message-ID: <87r23fknvz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36230) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK83v-0007a5-59 for Guix-devel@gnu.org; Mon, 14 Oct 2019 17:39:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iK83v-0000vR-0w for Guix-devel@gnu.org; Mon, 14 Oct 2019 17:39:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41436 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iK83u-0001Si-Ay for Guix-devel@gnu.org; Mon, 14 Oct 2019 17:39:30 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Guix-devel Hello Guix! I just wanted to share that recent commits have improved the performance of =E2=80=98package-derivation=E2=80=99 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 objects built in =E2=80=98commencement.scm=E2=80=99. As a result, there=E2= =80=99s much less work to do, less code to run, less stuff to memoize, all that. :-) Before these changes, if you=E2=80=99d run, say: guix graph -e '(@@ (gnu packages commencement) gnu-make-final)' you=E2=80=99d see the graph was huge and had a weird shape. Inde= ed, many parts were duplicated as a consequence of graph rewriting. That=E2=80= =99s 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 buil= d 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=E2=80=99s already a good step. Ludo=E2=80=99.