From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: guix package --search slow ? Date: Wed, 15 May 2019 11:54:30 +0200 Message-ID: References: <87o9447pul.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:60241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQqcX-0002xN-Up for guix-devel@gnu.org; Wed, 15 May 2019 05:54:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQqcW-0005NJ-7z for guix-devel@gnu.org; Wed, 15 May 2019 05:54:45 -0400 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]:38592) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQqcW-0005MR-3Y for guix-devel@gnu.org; Wed, 15 May 2019 05:54:44 -0400 Received: by mail-qk1-x741.google.com with SMTP id a64so1073625qkg.5 for ; Wed, 15 May 2019 02:54:42 -0700 (PDT) In-Reply-To: <87o9447pul.fsf@elephly.net> 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: Ricardo Wurmus Cc: Guix Devel On Tue, 14 May 2019 at 22:17, Ricardo Wurmus wrote: > > For me this command > > time guix package --search=python-numpy > > when run for the first time takes > > real 0m4.729s > user 0m1.332s > sys 0m0.815s > > All following invocations finish in about a second: > > real 0m1.469s > user 0m1.459s > sys 0m0.108s Your machine is probably faster than mine ;-) Yes, once the cache is warm, then it is faster. By "All following invocations" you mean a search for a non related previous one. Right? It is expected to be faster because the `fold' over all the package has warmed the memory cache (kernel stuff). Right? On my machine, I have: $ time guix package --search=numpy real 0m7.353s user 0m1.256s sys 0m0.136s $ time guix package --search=conduit real 0m0.728s user 0m0.764s sys 0m0.044s compared to Debian `aptitude` for example: $ time aptitude search numpy real 0m3.513s user 0m0.692s sys 0m0.092s $ time aptitude search conduit real 0m0.622s user 0m0.540s sys 0m0.048s So yes, it depends on how the memory cache is (echo 1 > /proc/sys/vm/drop_caches or echo 3 > /proc/sys/vm/drop_caches) , and once the cache is warmed, it is fast enough. My point is that the first search is (often)at least twice longer than the `aptitude` counter part. And even it is longer than a `git grep` on the raw .scm files. $ time git --no-pager grep numpy real 0m4.369s user 0m0.112s sys 0m0.132s $ time git --no-pager grep conduit real 0m0.069s user 0m0.108s sys 0m0.012s Well, maybe I miss a point. All the best, simon