From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 15:13:54 2020 Received: (at 39258) by debbugs.gnu.org; 11 Feb 2020 20:13:54 +0000 Received: from localhost ([127.0.0.1]:57613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1bus-0003TN-Ij for submit@debbugs.gnu.org; Tue, 11 Feb 2020 15:13:54 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:44009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1buq-0003TA-LG for 39258@debbugs.gnu.org; Tue, 11 Feb 2020 15:13:53 -0500 Received: by mail-qt1-f172.google.com with SMTP id d18so8978066qtj.10 for <39258@debbugs.gnu.org>; Tue, 11 Feb 2020 12:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Si1Km8WMwVjV002T5tmwksWftaiHa+fzxlF8ZpTj1+4=; b=umbl1g03luGy9yUh9mZxdJAOFaSHPcb0ZI+FxcS3EmA6yYG353CQhwWsQoTJ1H4zCQ RKFWvblFtn6OFvcnAoI9tYoSKzDseWOe+ER06yhB0RqCaY3P70VRoSoJQLDUODyceCSm YUh/eiKwjOqxQ4N5krQKqKLN6UH2F+oKzEG1eN4su0ZULCNR7oySVu96mNEm9X+x4sDK bMvWXykcGb2gjtgQCt8o3SEU9h0o1VLJBvZZPMoS4CME1pypTEo0Upl3e1ZSHWpybygt OaAP4xtXGn9/u1DIz5QvpKSwxXg7izjdGGa6oftrqTNRFv126ccJLrIalMrAj2UUWs+h UvNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Si1Km8WMwVjV002T5tmwksWftaiHa+fzxlF8ZpTj1+4=; b=aNoAxEQLpvEwv1SGWE1MYt/FUf22V6gShssC3nRnPTeBH4Sm4/iyMF4B9tzM3wZtto xRnZKanLRfOyH2jKmFMlC/W68l396jW7qdUcYwDVs8hUl4BkTbmxfcqKEs/3/T5m62LQ qIPNngzEKy9bApaK5003YCnFUV314AYPDPBBnWfHMepkBigBJhqCqxZEuBAbbFskGJwc O6iuMGs9hkFg5O0OY3NeGD6VR4513j0raO+x3hCRPZWj9sWaR+wkJ6EQ2dBY/gSaB8Ju 3AJYKbAxBUHwP6uwicjx0He77y9EOkuH6nk/Zjk96hkt8TrsmLwVfk1fS734c0X3eTZY WINw== X-Gm-Message-State: APjAAAVaLTpha4P5xBkalgGM1d+Rms32Sw2vPUq+xquk5bz8SdL4N/DZ Z/IR36bf9NAjViXSty8PhSjIfXbCLaeH7dQ2adU= X-Google-Smtp-Source: APXvYqxiBNnEvthzkE7C0NA95KeLh5JU77B+/hfSKnbYcbn4XheYphHgeYYwdFqqrS9UZxo8vKugV02PGFUHfZGWxXE= X-Received: by 2002:ac8:740f:: with SMTP id p15mr3938408qtq.211.1581452027124; Tue, 11 Feb 2020 12:13:47 -0800 (PST) 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: Subject: Re: [bug#39258] Faster guix search using an sqlite cache To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39258 Cc: Arun Isaac , 39258@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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