From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: guix package --search slow ? Date: Wed, 15 May 2019 16:50:58 +0200 Message-ID: References: <87o9447pul.fsf@elephly.net> <87r28zu9hs.fsf@gnu.org> <87k1eryflz.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQvLL-0001K9-Aj for guix-devel@gnu.org; Wed, 15 May 2019 10:57:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQvFP-0005AX-9n for guix-devel@gnu.org; Wed, 15 May 2019 10:51:13 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:35470) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQvFP-00059P-5c for guix-devel@gnu.org; Wed, 15 May 2019 10:51:11 -0400 Received: by mail-qt1-x833.google.com with SMTP id a39so1737742qtk.2 for ; Wed, 15 May 2019 07:51:10 -0700 (PDT) In-Reply-To: <87k1eryflz.fsf@ambrevar.xyz> 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: Pierre Neidhardt Cc: Guix Devel Hi Pierre, On Wed, 15 May 2019 at 16:08, Pierre Neidhardt wrote: > > > Another idea would be to have some kind of simple search which only > > includes the package name and maybe the synopsis. > > For Emacs users, it's what helm-system-packages does. It implements its > own names+synopses cache. helm-system-packages takes some seconds on > first start to build the cache; after that you get instant live search! :) You are doing ads for your package ;-) Well, I cite your doctring [1], that's the point. Guix is extremely slow to list everything, thus the cache is persisted on drive. It's only updated whenever `helm-system-packages-guix--last-pull-commits' is different from the cache commit. And what do mean by this comment [2] ;; We build both caches at the same time. We could also build just-in-time, but ;; benchmarks show that it only saves less than 20% when building one cache. Last, the "slowness" comes from `guix package --search` doing there [3], I guess. What is the size of the persistent cache? [1] https://github.com/emacs-helm/helm-system-packages/blob/master/helm-system-packages-guix.el#L141 [2] https://github.com/emacs-helm/helm-system-packages/blob/master/helm-system-packages-guix.el#L148 [3] https://github.com/emacs-helm/helm-system-packages/blob/master/helm-system-packages-guix.el#L163 Cheers, simon