From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#69188: bug#69233: 30.0.50; project-files + project-find-file is slow in large repositories Date: Mon, 29 Apr 2024 16:27:01 -0400 Message-ID: References: <1b566e9e-eca5-4746-8e31-4155d35ce7a8@gutov.dev> <4e8e8f14-26be-4a50-b47b-a0373ce19b9a@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69233@debbugs.gnu.org, 69188@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 29 22:27:56 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s1XbQ-0009dR-Jc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Apr 2024 22:27:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1XbE-0002zp-K2; Mon, 29 Apr 2024 16:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1XbC-0002wT-2U for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 16:27:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s1XbB-00012w-Mx for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 16:27:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s1XbV-0002lQ-QY for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2024 16:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Apr 2024 20:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69188 X-GNU-PR-Package: emacs Original-Received: via spool by 69188-submit@debbugs.gnu.org id=B69188.171442245010611 (code B ref 69188); Mon, 29 Apr 2024 20:28:01 +0000 Original-Received: (at 69188) by debbugs.gnu.org; 29 Apr 2024 20:27:30 +0000 Original-Received: from localhost ([127.0.0.1]:58734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1Xb0-0002l5-4K for submit@debbugs.gnu.org; Mon, 29 Apr 2024 16:27:30 -0400 Original-Received: from mxout6.mail.janestreet.com ([64.215.233.21]:34337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s1Xax-0002kt-VF for 69188@debbugs.gnu.org; Mon, 29 Apr 2024 16:27:28 -0400 In-Reply-To: <4e8e8f14-26be-4a50-b47b-a0373ce19b9a@gutov.dev> (Dmitry Gutov's message of "Wed, 17 Apr 2024 02:48:44 +0300") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1714422421; bh=AkAd6h6ePt4FCHh9p3mPHvTbZ0pzDPNSHnS8H2+kk7I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=qz1ZJQDRrzGLz7iUbVDfMVYGSSENfWgHkflCLxh+es9P5OuDAq/PvGPbsZKM0D2gX z7kuJQKPMHbuunz7fKYAnUEKF+vTLLWC92yrRb8Eb9geYUXOMPmXtdntxVwvMl/OjR 5jm1J+Eqx1i4uszFSPlK6OKgXULv1nORGQw2OgkW36n03TgOUWtxZR+xPIAuKcJNeb A6dOo8/qOV8nejaNQezin05kefXIzroCffhEnfdJ3T+bmO8qsoAnawZRrWbH2bd1OD rofGQ+wkX5EAjWEfn7d63Vgjmz5KD71TcCilvjwCizrR49HbL2g7ZJDUVnVGCddN5h hTeyIzqbrcf0g== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284175 Archived-At: Dmitry Gutov writes: > On 13/04/2024 05:34, Dmitry Gutov wrote: >> Both options are relatively clunky, and the second one might also >> fail to work when DIRS is non-nil (or would have to fall back to >> absolute names anyway), so I'm leaning toward the first one. It >> might also allow certain code to be written supporting both relative >> and absolute names (e.g. a process call both binds default-directory >> to root and keeps the file names as-is -- the relative ones would be >> interpreted as such, the rest just as they are interpreted now). > > Here's how that change can look. > > The patch should demonstrate both the performance improvements for > project-find-file and project-find-regexp, and some awkwardness in the > implementation, chiefly due to backward compatibility. > > Guess more tests will be required, at the very least. I see almost a 50% performance improvement with this patch in my large private repository, once adding support for project-files-relative-names in my internal project backend. Seems great so far. My benchmarking: (let ((proj (project-current))) (list (benchmark-run 10 (let ((project-files-relative-names t)) (length (project-files proj)))) (benchmark-run 10 (let ((project-files-relative-names nil)) (length (project-files proj)))))) ((17.605295389 28 7.647366087000023) (29.918302167 57 19.246283027999993))