From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Faster! Date: Wed, 30 Jan 2013 00:15:06 +0100 Message-ID: <874nhzk2dh.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 ([208.118.235.92]:44316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0KPU-0000uw-4x for bug-guix@gnu.org; Tue, 29 Jan 2013 18:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0KPT-00062e-8Y for bug-guix@gnu.org; Tue, 29 Jan 2013 18:16:12 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:13141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0KPT-00062S-2p for bug-guix@gnu.org; Tue, 29 Jan 2013 18:16:11 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org Hello! With commits a7b6ffe and bdcf35a, you should notice that =E2=80=98guix-buil= d=E2=80=99 and similar are more than twice as fast as two days ago. This was achieved by adding caches in the now obvious places, which noticeably reduces the number of round trips and the amount of data sent to the daemon. Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Faster! Date: Wed, 30 Jan 2013 21:47:36 +0100 Message-ID: <201301302147.37021.andreas@enge.fr> References: <874nhzk2dh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_pbYCR7NoAIeBjb6" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0eZN-0003C0-Bd for bug-guix@gnu.org; Wed, 30 Jan 2013 15:47:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0eZK-0007Mb-Aa for bug-guix@gnu.org; Wed, 30 Jan 2013 15:47:45 -0500 In-Reply-To: <874nhzk2dh.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@gnu.org --Boundary-01=_pbYCR7NoAIeBjb6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: > With commits a7b6ffe and bdcf35a, you should notice that =E2=80=98guix-bu= ild=E2=80=99 > and similar are more than twice as fast as two days ago. Excellent! Is "guix-package --roll-back" also faster now? It feels so! Andreas --Boundary-01=_pbYCR7NoAIeBjb6 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Am Mittwoch= , 30. Januar 2013 schrieb Ludovic Court=C3=A8s:

> With c= ommits a7b6ffe and bdcf35a, you should notice that =E2=80=98guix-build=E2= =80=99

> and si= milar are more than twice as fast as two days ago.

&nb= sp;

Excellent! = Is "guix-package --roll-back" also faster now? It feels so!

&nb= sp;

Andreas

&nb= sp;

--Boundary-01=_pbYCR7NoAIeBjb6-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Wed, 30 Jan 2013 22:04:52 +0100 Message-ID: <878v7aidqj.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302147.37021.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0eq0-0002jT-3X for bug-guix@gnu.org; Wed, 30 Jan 2013 16:04:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0epz-0003tj-5Q for bug-guix@gnu.org; Wed, 30 Jan 2013 16:04:56 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:9164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0epy-0003tN-VO for bug-guix@gnu.org; Wed, 30 Jan 2013 16:04:55 -0500 In-Reply-To: <201301302147.37021.andreas@enge.fr> (Andreas Enge's message of "Wed, 30 Jan 2013 21:47:36 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: >> With commits a7b6ffe and bdcf35a, you should notice that =E2=80=98guix-b= uild=E2=80=99 >> and similar are more than twice as fast as two days ago. There=E2=80=99ve been additional optimizations in the meantime, so it=E2=80= =99s now 4 times as fast as 3 days ago. :-) > Excellent! Is "guix-package --roll-back" also faster now? It feels so! C=E2=80=99m=E2=80=99on, this one was already fast, because all it does is t= o create a symlink. Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Faster! Date: Wed, 30 Jan 2013 22:17:36 +0100 Message-ID: <201301302217.36280.andreas@enge.fr> References: <874nhzk2dh.fsf@gnu.org> <201301302147.37021.andreas@enge.fr> <878v7aidqj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_w3YCRll+o3tSnva" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0f2N-0008Gn-MQ for bug-guix@gnu.org; Wed, 30 Jan 2013 16:17:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0f2L-0007kX-A6 for bug-guix@gnu.org; Wed, 30 Jan 2013 16:17:43 -0500 In-Reply-To: <878v7aidqj.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org --Boundary-01=_w3YCRll+o3tSnva Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: > C=E2=80=99m=E2=80=99on, this one was already fast, because all it does is= to create a > symlink. That is why I wondered. But when I rolled back 20 generations the other=20 day, it did not feel fast at all. Andreas --Boundary-01=_w3YCRll+o3tSnva Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Am Mittwoch= , 30. Januar 2013 schrieb Ludovic Court=C3=A8s:

> C=E2= =80=99m=E2=80=99on, this one was already fast, because all it does is to cr= eate a

> symlin= k.

&nb= sp;

That is why= I wondered. But when I rolled back 20 generations the other day, it did no= t feel fast at all.

&nb= sp;

Andreas

&nb= sp;

--Boundary-01=_w3YCRll+o3tSnva-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Wed, 30 Jan 2013 23:04:53 +0100 Message-ID: <87sj5ifhtm.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302147.37021.andreas@enge.fr> <878v7aidqj.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0fm8-0000hu-Br for bug-guix@gnu.org; Wed, 30 Jan 2013 17:05:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0fm4-0004ha-Bh for bug-guix@gnu.org; Wed, 30 Jan 2013 17:05:00 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:1202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0fm4-0004hR-5G for bug-guix@gnu.org; Wed, 30 Jan 2013 17:04:56 -0500 In-Reply-To: <201301302217.36280.andreas@enge.fr> (Andreas Enge's message of "Wed, 30 Jan 2013 22:17:36 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: >> C=E2=80=99m=E2=80=99on, this one was already fast, because all it does i= s to create a >> symlink. > > That is why I wondered. But when I rolled back 20 generations the other=20 > day, it did not feel fast at all. Really? That=E2=80=99s weird. Building the empty profile can take a bit of time the first time (a few seconds at most), but other than that, it should be fast. Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Faster! Date: Wed, 30 Jan 2013 23:09:07 +0100 Message-ID: <201301302309.07567.andreas@enge.fr> References: <874nhzk2dh.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> <87sj5ifhtm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_DoZCRq/+ZVmZ1ps" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0fqG-0001er-59 for bug-guix@gnu.org; Wed, 30 Jan 2013 17:09:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0fqD-0005zE-8I for bug-guix@gnu.org; Wed, 30 Jan 2013 17:09:16 -0500 In-Reply-To: <87sj5ifhtm.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: bug-guix@gnu.org --Boundary-01=_DoZCRq/+ZVmZ1ps Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: > Really? That=E2=80=99s weird. Building the empty profile can take a bit= of > time the first time (a few seconds at most), but other than that, it > should be fast. Well, it depends on your definition of fast. A second, I would say, which=20 felt slow given that it was only a symlink. Maybe this was just the time=20 for starting guix-package; did it become faster? Andreas --Boundary-01=_DoZCRq/+ZVmZ1ps Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Am Mittwoch= , 30. Januar 2013 schrieb Ludovic Court=C3=A8s:

> Really= ? That=E2=80=99s weird. Building the empty profile can take a bit of

> time t= he first time (a few seconds at most), but other than that, it

> should= be fast.

&nb= sp;

Well, it de= pends on your definition of fast. A second, I would say, which felt slow gi= ven that it was only a symlink. Maybe this was just the time for starting g= uix-package; did it become faster?

&nb= sp;

Andreas

&nb= sp;

--Boundary-01=_DoZCRq/+ZVmZ1ps-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Wed, 30 Jan 2013 23:51:26 +0100 Message-ID: <87ehh2ffo1.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> <87sj5ifhtm.fsf@gnu.org> <201301302309.07567.andreas@enge.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0gV8-0007RT-2S for bug-guix@gnu.org; Wed, 30 Jan 2013 17:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0gV7-0000ib-67 for bug-guix@gnu.org; Wed, 30 Jan 2013 17:51:29 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:28221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0gV7-0000iP-04 for bug-guix@gnu.org; Wed, 30 Jan 2013 17:51:29 -0500 In-Reply-To: <201301302309.07567.andreas@enge.fr> (Andreas Enge's message of "Wed, 30 Jan 2013 23:09:07 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org Andreas Enge skribis: > Am Mittwoch, 30. Januar 2013 schrieb Ludovic Court=C3=A8s: >> Really? That=E2=80=99s weird. Building the empty profile can take a bi= t of >> time the first time (a few seconds at most), but other than that, it >> should be fast. > > Well, it depends on your definition of fast. A second, I would say, which= =20 > felt slow given that it was only a symlink. Maybe this was just the time= =20 > for starting guix-package; did it become faster? No, but it=E2=80=99s true that it=E2=80=99s surprisingly slow to start: --8<---------------cut here---------------start------------->8--- $ time ./pre-inst-env guix-package real 0m1.084s user 0m0.904s sys 0m0.058s $ time ./pre-inst-env guix-build real 0m0.101s user 0m0.081s sys 0m0.017s --8<---------------cut here---------------end--------------->8--- Worth investigating... Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Thu, 31 Jan 2013 23:22:52 +0100 Message-ID: <87622dgfgj.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> <87sj5ifhtm.fsf@gnu.org> <201301302309.07567.andreas@enge.fr> <87ehh2ffo1.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 ([208.118.235.92]:54565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U12X2-00014u-Oy for bug-guix@gnu.org; Thu, 31 Jan 2013 17:22:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U12X1-0001aq-72 for bug-guix@gnu.org; Thu, 31 Jan 2013 17:22:56 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:33681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U12X1-0001aV-1S for bug-guix@gnu.org; Thu, 31 Jan 2013 17:22:55 -0500 In-Reply-To: <87ehh2ffo1.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 30 Jan 2013 23:51:26 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > No, but it=E2=80=99s true that it=E2=80=99s surprisingly slow to start: > > $ time ./pre-inst-env guix-package > > real 0m1.084s > user 0m0.904s > sys 0m0.058s This is actually the time it takes to connect to the daemon, and to compute the derivation of Guile (which is then used to build the profile, if a profile gets built.) Queries (-I and -A) don=E2=80=99t need this, so I just rearranged the code accordingly. Both now take less than .2s on my laptop. In the roll-back case, neither is necessary, except when rolling back to generation 0 for the first time. All other actions need it. So I just kept it for all the actions, including roll-back. Thanks, Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: Re: Faster! Date: Mon, 04 Feb 2013 14:12:20 -0500 Message-ID: <87fw1byjti.fsf@karetnikov.org> References: <874nhzk2dh.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> <87sj5ifhtm.fsf@gnu.org> <201301302309.07567.andreas@enge.fr> <87ehh2ffo1.fsf@gnu.org> <87622dgfgj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2RSm-0003x8-DY for bug-guix@gnu.org; Mon, 04 Feb 2013 14:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2RSj-0007YO-RC for bug-guix@gnu.org; Mon, 04 Feb 2013 14:12:20 -0500 In-Reply-To: <87622dgfgj.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "(unknown date)") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: bug-guix@gnu.org --=-=-= While we are at it, will it be better to rewrite 'fold-packages' and similar things (like 'search') using streams? For example: #:use-module (ice-9 streams) [...] (define (fold-packages-lazy proc init) "Call (PROC PACKAGE RESULT) for each available package, using INIT as the initial value of RESULT." (stream-fold (lambda (module result) (stream-fold (lambda (var result) (if (package? var) (proc var result) result)) result (list->stream (module-map (lambda (sym var) (false-if-exception (variable-ref var))) module)))) init (list->stream (package-modules)))) 'time' shows that the above is a bit slower than the current version. Will it be faster when we have more packages? What about memory? --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJREAguAAoJEM+IQzI9IQ38ZAcP+wYNx0azrz1HkBm3O6riR6Rt 4M1tJYw1Ywg5ld2N9WTtOW3NBPSqmAAV2wPqwl5fa1mVBKRWomfqOt0oRT+/wRZJ zhhnwKliBpfBoBHfNZWnnpvaaGJZeKMZ2BWY3hZVVcWEaQPV0hXSfbylkY8JI4U7 gPjf+fbxlp3WUVTULXMCDOnNrStUpbKUW7eRiBqi+HOHIg+jcBG14OtJNnL2WRcI JUB/JrPsBaaPgfnDX3j3TIr4F1hmKuNnNUDiEP1ofExf22HQq4LBdTq4TXRrR6il lni7uBb4FgPis485odhlvab3cUXHvB1jDnokewn1MF5RQMoc+SMFSGBq+ec7uGLJ J8S6VAvAwsaa2ppfkWxraELcKu5awc6oLx/sChOomTBEuZUpB3HMGGNaRFtnFD3i YlxjNuReGE3z2dezoX/PLNMfYAoRnW53yJXBRD9UGHRG70ALK+kTRiiNB/XeFDUg NCC0CQLQdSmz91qtSHidqWADgVDF+NS1+5MipsQYFJIRyv6hr0F/D7e8FnwzuPrV aA6G7n+IBiNgrtWwpNV3//hiuNf2aGE5dW7rZPwJ7VM+lZ8OGfx4hXNAaMaljXHi N5XPtCHbNdHwfMhQLLBWFKLvUaz0DBvGgpMqHn+jIc416MriQvAxtU5joGwkB5VA F8U8+rM0T9n1PrBfQHYm =FrVt -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Mon, 04 Feb 2013 22:37:14 +0100 Message-ID: <871ucvu5f9.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302217.36280.andreas@enge.fr> <87sj5ifhtm.fsf@gnu.org> <201301302309.07567.andreas@enge.fr> <87ehh2ffo1.fsf@gnu.org> <87622dgfgj.fsf@gnu.org> <87fw1byjti.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Tj5-0001gx-K7 for bug-guix@gnu.org; Mon, 04 Feb 2013 16:37:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2Tj4-00006Z-4x for bug-guix@gnu.org; Mon, 04 Feb 2013 16:37:19 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2Tj3-00006O-Uh for bug-guix@gnu.org; Mon, 04 Feb 2013 16:37:18 -0500 In-Reply-To: <87fw1byjti.fsf@karetnikov.org> (Nikita Karetnikov's message of "Mon, 04 Feb 2013 14:12:25 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov skribis: > While we are at it, will it be better to rewrite 'fold-packages' and > similar things (like 'search') using streams? Good question. [...] > 'time' shows that the above is a bit slower than the current version. > Will it be faster when we have more packages? What about memory? It will necessarily use slightly more memory. Performance depends on our use cases. Currently, all our use cases (finding packages by name or by description, listing them, etc.) traverse the whole list. Thus, it would not buy us anything to use streams here. Perhaps we can revisit that if/when we have an application where it would help, but that doesn=E2=80=99t come to mind here. WDYT? Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Faster! Date: Sat, 16 Mar 2013 17:43:03 +0100 Message-ID: <87obejs3c8.fsf@gnu.org> References: <874nhzk2dh.fsf@gnu.org> <201301302147.37021.andreas@enge.fr> <878v7aidqj.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 ([208.118.235.92]:34859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGuCR-0002dK-Ij for bug-guix@gnu.org; Sat, 16 Mar 2013 12:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGuCQ-0006Mv-Mh for bug-guix@gnu.org; Sat, 16 Mar 2013 12:43:15 -0400 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=43513 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGuCQ-0006Lw-GR for bug-guix@gnu.org; Sat, 16 Mar 2013 12:43:14 -0400 In-Reply-To: <878v7aidqj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 30 Jan 2013 22:04:52 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Andreas Enge Cc: bug-guix@gnu.org The saga continues! With today=E2=80=99s commit, the execution time of guix build -e '(@ (gnu packages emacs) emacs)' -d is down from 1.54s to 1.08s on my 2.6 GHz laptop. That=E2=80=99s 30%. :-) The head of the profile is now like this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,pr (package-derivation s emacs) % cumulative self time seconds seconds name 29.07 0.35 0.33 write 8.14 0.09 0.09 search-path 6.98 0.09 0.08 open-file 5.81 0.07 0.07 read 4.65 0.51 0.05 call-with-output-string 4.65 0.05 0.05 %after-gc-thunk 3.49 0.04 0.04 hash-ref 2.33 0.24 0.03 write-derivation 2.33 0.07 0.03 bytevector-quintet-fold-right 2.33 0.03 0.03 # 2.33 0.03 0.03 hash-set! 2.33 0.03 0.03 display [...] 0.00 0.79 0.00 build-expression->derivation [...] --- Sample count: 86 Total time: 1.125903012 seconds (0.152722833 seconds in GC) --8<---------------cut here---------------end--------------->8--- IOW, the main bottleneck is in Guile=E2=80=99s =E2=80=98write=E2=80=99 and = port output (as called from =E2=80=98build-expression->derivation=E2=80=99). We also do a lot of GC. This could be improved by optimizing the RPCs in store.scm to allocate less. Ludo=E2=80=99.