From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 05 11:46:16 2020 Received: (at 39258) by debbugs.gnu.org; 5 Mar 2020 16:46:16 +0000 Received: from localhost ([127.0.0.1]:43640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9tdX-00006S-UT for submit@debbugs.gnu.org; Thu, 05 Mar 2020 11:46:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j9tdV-00006F-DJ for 39258@debbugs.gnu.org; Thu, 05 Mar 2020 11:46:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j9tdO-0000fh-HM; Thu, 05 Mar 2020 11:46:06 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33932 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j9tdO-0007jf-0Q; Thu, 05 Mar 2020 11:46:06 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Arun Isaac Subject: Re: [PATCH 0/4] Xapian for Guix package search References: <20200227204150.30985-1-arunisaac@systemreboot.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?utf-8?Q?Vent=C3=B4se?= an 228 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 05 Mar 2020 17:46:01 +0100 In-Reply-To: <20200227204150.30985-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Fri, 28 Feb 2020 02:11:46 +0530") Message-ID: <87h7z292d2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39258 Cc: mail@ambrevar.xyz, 39258@debbugs.gnu.org, zimon.toutoune@gmail.com 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.7 (-) Hello Arun, Arun Isaac skribis: > * Speed improvement > > Despite search-package-index in gnu/packages.scm taking only around 1.5ms= , I > see an overall speedup in `guix search` of only a factor of 2 -- from aro= und > 2s to around 1s. I wonder what else in `guix search` is taking up so much > time. Note that =E2=80=98guix search=E2=80=99 time is largely dominated by I/O. = On my laptop, I get (first measurement is cold cache, second one is warm cache): --8<---------------cut here---------------start------------->8--- $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time guix search foo >/dev/null real 0m2.631s user 0m1.134s sys 0m0.124s $ time guix search foo >/dev/null real 0m0.836s user 0m1.027s sys 0m0.053s --8<---------------cut here---------------end--------------->8--- It=E2=80=99s hard to do better on the warm cache case because at this level, there may be other things to optimize having little to do with searching itself. Note that this is on an SSD; the cold-cache case must be worse on NFS or on a spinning disk, and there we could gain a lot. I think we should weigh the pros and cons on all these aspects: speed, complexity and maintenance cost, search result quality, search features, etc. Thanks, Ludo=E2=80=99. PS: I have not yet looked at the whole series as I=E2=80=99m just coming ba= ck to the keyboard. :-)