From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: Re: guix package is slow Date: Sun, 01 Jul 2018 11:32:39 -0400 Message-ID: <87y3evug2w.fsf@gmail.com> References: <8a4e9b4cb730094a84ef3ff29233c6dd@riseup.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZeLE-0007V4-SL for guix-devel@gnu.org; Sun, 01 Jul 2018 11:32:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZeLB-0000il-Ow for guix-devel@gnu.org; Sun, 01 Jul 2018 11:32:44 -0400 Received: from mail-it0-x22c.google.com ([2607:f8b0:4001:c0b::22c]:51509) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZeLB-0000i9-JY for guix-devel@gnu.org; Sun, 01 Jul 2018 11:32:41 -0400 Received: by mail-it0-x22c.google.com with SMTP id o5-v6so7962793itc.1 for ; Sun, 01 Jul 2018 08:32:41 -0700 (PDT) In-Reply-To: <8a4e9b4cb730094a84ef3ff29233c6dd@riseup.net> (swedebugia's message of "Sat, 30 Jun 2018 08:20:48 -0700") 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: swedebugia@riseup.net Cc: guix-devel Hello! swedebugia@riseup.net writes: > Hi > > I would like guix package -A/s to be faster. > There it takes >3s every time I run the command. I agree that Guix is rather slow when comparing it to traditional package managers such as apt; I think the main reason, as you found, is that it has to load all the byte-compiled package definition files. > Would it be possible to populate an index or something when pulling so > that we have the information in a sqlite-db instead of traversing 40 > go-files with guile? I remember asking Ludovic in #guix if Guile would be able to compete with database software in terms of performance, and he said there are ways we can make it faster. I'm not very knowledgeable myself about Guile but if we could make it support static linking, to load only one binary rather than hundreds in the case of Guix, that would be one way to speed things. Next thing might be to implement native compilation. > On an older guixsd with about 4k packages the delay was noticeably > shorter. I guess the time it takes grows linearly (I hope!) with the number of packages/modules it has to load. We're now at double that amount of packages (IIRC), so Guix might take double the time it used to. > What do you think? Note that if you are using emacs-guix, the packages are kept in memory so the operations there are much faster than when using the CLI. Using an external databases to speed Guix is an interesting idea, but Id rather have a lightning fast Guile in the longer term :) Maxim