From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:57818) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1bv2-000631-1H for guix-patches@gnu.org; Tue, 11 Feb 2020 15:14:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1bv0-0002Pi-PP for guix-patches@gnu.org; Tue, 11 Feb 2020 15:14:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1bv0-0002PO-Lq for guix-patches@gnu.org; Tue, 11 Feb 2020 15:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1bv0-0003Tr-Fy for guix-patches@gnu.org; Tue, 11 Feb 2020 15:14:02 -0500 Subject: [bug#39258] Faster guix search using an sqlite cache Resent-Message-ID: MIME-Version: 1.0 References: <8736bhytn9.fsf@gnu.org> <87sgjhx92g.fsf@gnu.org> In-Reply-To: <87sgjhx92g.fsf@gnu.org> From: zimoun Date: Tue, 11 Feb 2020 21:13:35 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Arun Isaac , 39258@debbugs.gnu.org Hi Ludo, On Tue, 11 Feb 2020 at 19:39, Ludovic Court=C3=A8s wrote: > > About performance, the idea was to first implement something with > > sqlite and then see if it makes the difference. I mean I have > > understood that. > > Yes. But keep in mind that this package cache is used exclusively for > package lookups by name. Namely, the goal is to speed package lookup in I agree that some confusion happens here. And this cache cannot be improved= . > >> However, using sqlite for keyword search as you initially proposed on > >> guix-devel does sound like a great idea to me. > > > > If I understand correctly, you are proposing 2 caches, right? > > Or are you proposing an inverted index (VHash/VList table) based on > > trigrams to speed up the lookup? > > Arun started the discussion on guix-devel with the idea of an inverted > index, and I thought this would become a second index (possibly > implemented using SQLite). Perhaps I misunderstood the discussion all > along though, let me know! :-) Well, your suggestion is very welcome and 2 caches are required: one for the lookup by name, as it is already (and does a good job); another one for "guix search" speeds up, SQLite or whatever (based on inverted index or whatever). Thanks, simon