From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Inverted index to accelerate guix package search Date: Thu, 16 Jan 2020 16:04:53 +0100 Message-ID: References: <87a76r68u6.fsf@ambrevar.xyz> <87sgkgxwir.fsf@elephly.net> <87a76ncvg0.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]:58427) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is6hs-0003a2-1X for guix-devel@gnu.org; Thu, 16 Jan 2020 10:05:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is6hq-00059J-S4 for guix-devel@gnu.org; Thu, 16 Jan 2020 10:05:11 -0500 In-Reply-To: <87a76ncvg0.fsf@gnu.org> 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-mx.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix Devel Hi Ludo, On Thu, 16 Jan 2020 at 15:46, Ludovic Court=C3=A8s wrote: > > We could build and install the index when Guix is built and installed > > and then use it for the search. I can=E2=80=99t think of a downside to= adopting > > an index compared to what we have now. > > The possible downsides are (1) =E2=80=98guix pull=E2=80=99 will take an a= dditional 8 > seconds, (2) there=E2=80=99ll be some extra complexity because the curren= t > implementation needs to be kept anyway for when the pre-built index is > not authoritative=E2=80=94i.e., when =E2=80=98GUIX_PACKAGE_PATH=E2=80=99 = is set or when =E2=80=98-L=E2=80=99 is > used; see =E2=80=98cache-is-authoritative?=E2=80=99 in (gnu packages). About (1), let implement something experimental and time it to compare apples with apples. :-) I mean I am working on it. As said elsewhere, "guix search" could be improved in different area and the inverted index is an easy first step, IMHO. About (2), I have not figured out yet how "guix pull" works and all the relative folders in ~/.cache/guix. I will report my issues later. :-) > I don=E2=80=99t find =E2=80=98guix search=E2=80=99 to be excessively slow= currently (on an SSD > at least), but I agree that the speedup would be welcome! One next step would to search in all the packages and/or services that "guix time-machine" can manipulate. Cheers, simon