From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 55ec674: * lisp/multifile.el: New file, extracted from etags.el Date: Thu, 03 Jan 2019 02:37:16 +0200 Organization: LINKOV.NET Message-ID: <878t02d0cz.fsf@mail.linkov.net> References: <20180922154639.23195.66360@vcs0.savannah.gnu.org> <20180922154640.9D58220310@vcs0.savannah.gnu.org> <54108dbc-9d12-06ff-3f1d-151118e9b234@yandex.ru> <385f6543-2214-101c-30b8-a8115a8dbede@yandex.ru> <87zhsi7mlt.fsf@mail.linkov.net> <6ff6f811-29eb-6e08-e95c-46bdfee08993@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546477578 6704 195.159.176.226 (3 Jan 2019 01:06:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 01:06:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 03 02:06:13 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gerSe-0001de-Fv for ged-emacs-devel@m.gmane.org; Thu, 03 Jan 2019 02:06:12 +0100 Original-Received: from localhost ([127.0.0.1]:48277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gerUk-0006E5-Rx for ged-emacs-devel@m.gmane.org; Wed, 02 Jan 2019 20:08:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gerU4-0006Dp-QR for emacs-devel@gnu.org; Wed, 02 Jan 2019 20:07:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gerTs-0004kf-RH for emacs-devel@gnu.org; Wed, 02 Jan 2019 20:07:35 -0500 Original-Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:37284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gerTs-0004gf-5i for emacs-devel@gnu.org; Wed, 02 Jan 2019 20:07:28 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1E2EF5E233B; Thu, 3 Jan 2019 01:07:25 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (unknown [100.96.26.166]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B53645E2AF4; Thu, 3 Jan 2019 01:07:24 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Thu, 03 Jan 2019 01:07:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Befitting-Oafish: 22f246250a56739d_1546477644979_1731977884 X-MC-Loop-Signature: 1546477644978:3952814999 X-MC-Ingress-Time: 1546477644978 Original-Received: from pdx1-sub0-mail-a23.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a23.g.dreamhost.com (Postfix) with ESMTP id 51E2680072; Wed, 2 Jan 2019 17:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=HhNLps aPeD24lfn/z/RIziLjaks=; b=M0RtG3HDTtu9nAepMxnpgxRQ/NLwcV3VTAafhD gk8cG0boZrKJZ758zhBxNlum8earVkHlcAdjvtcVY9At/1BjWRWhD4ft7G3BFze2 3WLb6UqEAXO7QIrk4Z+YlLPx4Hw6iBb9O8PTbsO3gsbAkz5NCbiiV+F5ijhoRj0C hIdGg= Original-Received: from mail.jurta.org (m91-129-100-233.cust.tele2.ee [91.129.100.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 6C5F080069; Wed, 2 Jan 2019 17:07:19 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a23 In-Reply-To: <6ff6f811-29eb-6e08-e95c-46bdfee08993@yandex.ru> (Dmitry Gutov's message of "Thu, 3 Jan 2019 02:02:45 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrudejgdefgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddtrddvfeefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddttddrvdeffedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegughhuthhovheshigrnhguvgigrdhruhenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.214.98 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232122 Archived-At: > On 03.01.2019 0:53, Juri Linkov wrote: >> On the very old computer from the year 2010, but the most interesting = are relative times: >> >> (benchmark 10 '(project-find-regexp "xyz1")) >> =3D> 7s >> (benchmark 10 '(project-files-pipe-grep "xyz1")) >> =3D> 17s > > This is too bad. But did you use project-files-pipe-grep from > 446bcaed37b66ec112aaec7a7960e20b969c8012 or > from c708231803712bd37154c140afdfd8468cac603e? I tried with the latest c708231803 (at least =E2=80=98vc-log-mergebase=E2= =80=99 shows that it's the latest), but optimized: (dolist (f files) (process-send-string process f) (process-send-string process "\0")) was replaced with (process-send-string process (mapconcat #'identity files "\0")) with no performance impact. Trying 446bcaed37 has no difference either. >> (benchmark 10 '(project-files (project-current t))) >> =3D> 11s > > This is weird. I can understand that listing all files can be slower on= an > old, HDD-based computer. But both project-find-regexp and project-files= use > 'find ... -path], and the former even adds Grep on top of it. Why is th= e > "simpler" operation slower? Are you sure that project-find-regexp uses =E2=80=98find ... -path=E2=80=99= ? I see that slowness is because of many =E2=80=98-path=E2=80=99 filters us= ed in project-files. >> (benchmark 10 '(shell-command-to-string "find ... \\( -path ... \\) -p= rune -o -type f -print0")) >> =3D> 11s >> >> (benchmark 10 '(shell-command-to-string "git ls-files")) >> =3D> 0.07s > > Could you try making a full project-files implementation on top of it? > I wonder how much slower it will be. > > At least test (split-string (shell-command-to-string "git ls-files -z")= "\0" t) Using this instead of =E2=80=98(project-files (project-current t))=E2=80=99= : (benchmark 10 '(project-files-pipe-grep "xyz1")) =3D> 3s