From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: A project-files implementation for Git projects Date: Fri, 04 Oct 2019 09:47:30 +0200 Message-ID: <875zl5hrzh.fsf@gnu.org> References: <8736h9rdc4.fsf@gnu.org> <87a7bbjdwe.fsf@gnu.org> <87a7ba8uvx.fsf@gnu.org> <87pnk2zvvy.fsf@gnu.org> <87sgows6wy.fsf@gnu.org> <87ef0dy18z.fsf@gnu.org> <87impk675h.fsf@gnu.org> <874l13h30l.fsf@gnu.org> <7386ef98-c151-e1ce-23fa-11470a16f0d3@yandex.ru> <87h84x1zoa.fsf@gnu.org> <4be972f9-45a3-f2aa-f532-d7b8fbe054fd@yandex.ru> <17994e8f-9940-2da5-216e-20a5d3842822@yandex.ru> <87r23u9qjc.fsf@gnu.org> <1ffb046d-f2de-b1d5-d6a9-a6059616cc08@yandex.ru> <87imp5kax0.fsf@gnu.org> <1a9a7f78-fbef-176d-9189-7007046d3fb1@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="50583"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 09:49:19 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGIKy-000D0j-Ue for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 09:49:17 +0200 Original-Received: from localhost ([::1]:42888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGIKx-0001Ch-M1 for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 03:49:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34542) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGIJS-0000uG-6P for emacs-devel@gnu.org; Fri, 04 Oct 2019 03:47:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iGIJR-0005vs-Gr; Fri, 04 Oct 2019 03:47:41 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:53713) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1iGIJQ-0007XD-1w; Fri, 04 Oct 2019 03:47:40 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 61CEC21BA9; Fri, 4 Oct 2019 03:47:39 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 04 Oct 2019 03:47:39 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrhedtgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucfkphepkeegrddufedvrdelle drgeeinecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppe hgnhhurdhorhhgsehfrghsthhmrghilhdrfhhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: from thinkpad-t440p (p5484632e.dip0.t-ipconnect.de [84.132.99.46]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B48D80061; Fri, 4 Oct 2019 03:47:38 -0400 (EDT) Mail-Followup-To: Dmitry Gutov , emacs-devel@gnu.org In-Reply-To: <1a9a7f78-fbef-176d-9189-7007046d3fb1@yandex.ru> (Dmitry Gutov's message of "Fri, 4 Oct 2019 01:49:23 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:240549 Archived-At: Dmitry Gutov writes: Hi Dmitry, >> I just tried with the gcc repository with its about 100000 files. >> Here it was about equal with ~30secs for both git and find. The git >> ls-files invocation on the command line with output piped to >> /dev/null is done in one tenth of a second. >> Oh, when dropping the `expand-file-name' call we're doing on every >> file, it's ten times faster (~3secs). > > Nice observation, thanks. It's a significant per-item cost, so no > surprise projects with lots of files are (were) doing worse than > 'find'. > > I've changed it to 'concat' now which isn't free, but much faster. Yes, that's much better/faster. But shouldn't we use (let ((default-directory (file-name-as-directory dir)) ... in order to ensure that default-directory always has a trailing / and concat DTRT? By the way, in my major use-case for `project-files' (a source to raven) I want the files to be relative to the given directory. So I'm calling `file-relative-name' on every file in the result. It would be cool if there was a way to return the file names relative to the given directory (which wouldn't make much sense if multiple dirs are given, though). > I wish someone did some benchmarking with Hg projects. > mozilla-central (~200000 files) is still slower on my machine with Hg > than with 'find'. I'll do. Bye, Tassilo