From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#42966: 28.0.50; vc-dir: wrong backend Date: Sat, 24 Oct 2020 22:42:57 +0300 Message-ID: <057dedcd-8f2f-615e-f660-389b9013336a@yandex.ru> References: <87d01imtwl.fsf@gnus.org> <3708c3db-df78-1a50-857a-595f2412e284@yandex.ru> <87v9fa44im.fsf@gnus.org> <1e9908c7-337d-9790-cd37-5232bc04233c@yandex.ru> <875z79z5mw.fsf@gnus.org> <52df0404-979f-872b-a60e-5259c0893f15@yandex.ru> <87wnzonful.fsf@gmx.de> <87y2jvwxkd.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: Lars Ingebrigtsen , Sam Steingold , 42966@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 24 21:44:19 2020 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 1kWPSd-0000xq-KM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 21:44:19 +0200 Original-Received: from localhost ([::1]:49368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWPSc-0004iu-Kd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 15:44:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWPSN-0004id-Gm for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWPSL-0006yQ-S8 for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWPSL-0000G5-Qi for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 15:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42966 X-GNU-PR-Package: emacs Original-Received: via spool by 42966-submit@debbugs.gnu.org id=B42966.1603568588887 (code B ref 42966); Sat, 24 Oct 2020 19:44:01 +0000 Original-Received: (at 42966) by debbugs.gnu.org; 24 Oct 2020 19:43:08 +0000 Original-Received: from localhost ([127.0.0.1]:35163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPRU-0000EF-G3 for submit@debbugs.gnu.org; Sat, 24 Oct 2020 15:43:08 -0400 Original-Received: from mail-ej1-f68.google.com ([209.85.218.68]:36107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPRR-0000DU-RR for 42966@debbugs.gnu.org; Sat, 24 Oct 2020 15:43:07 -0400 Original-Received: by mail-ej1-f68.google.com with SMTP id w27so7383421ejb.3 for <42966@debbugs.gnu.org>; Sat, 24 Oct 2020 12:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZCDsTFgQtp8tB/s0gM9c9hoLVyNV30J1hSIpPpQSEM0=; b=P2BlYF1LXxsXh/sKsQ48DB+jynJKxehtZpyVlEnsRsI8Apy6ylTFFulb7luKi04c91 ygSqAqoL+Uy3L3ULgRyXvwCSoYoZQgR5wUysJ9Dfm8h20N/yx3LqsHqin0ldmKYVA1Af g5+GdziTF6h9aNnPxJ1qp/HZTfGkNtsORn/ya4jvgeYvB+xuQnrhRSN9ipgXVvpz0mbf Ma6NI/PbaAlIVyZjJ6lnFajLRKZ122ogNCh0sfAB2uCB1TC3+d29my5ae86zb+JYmSbD JquSeZ3NhRlW5sInAlZnWFA3q6nCN2TrMvWn+T3vv60cU6PRYGm7ZEhyu4Kczdkiz2BE 40lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZCDsTFgQtp8tB/s0gM9c9hoLVyNV30J1hSIpPpQSEM0=; b=i7jPw0gPg8QSvUNSz8UOSFjlNEAzL325RcaAiWvF006+5FhCLSHPtbulZJH/kzR5fx 0J1J6PCVtZbrUY1V0vYoPuccOV6FCyugVdvi/AOXK/Z/UmgEwQkI29RKsPKKvYl17IwH +LlkZGnXO0LOfpgLOlm5lo8ZYH8ag9j0iaaKkgnE5egK1t36GhZRbKYiLjXbqfbw4I3b auZnHorpJWRBTrbvisDEOcBqBMH5obIOpwmYs6p8o1zyxG97bcc1JL8spc9qfocgiCkN 4qIw8QHHvIBXU8xn5Z4WRO+nBYXSr1rrvNb+zY+etVDT/wOfevNKmfZPhSjDr9wpH8VK eOaQ== X-Gm-Message-State: AOAM530dovh6FLx3gez2rJfxGGGg6cRMGljZswup2ogouvQkOnIxdkix KyibuLc++9AFnEVFpCh8GKtpFG/SQQ94Hw== X-Google-Smtp-Source: ABdhPJzD0Jar4qUPGHCp/lA2nW9tea70czBVLpw6d2eJECOjJhwFdCQ0tAkkysPUCS542OddRsWfBg== X-Received: by 2002:a17:906:9483:: with SMTP id t3mr8575442ejx.390.1603568579642; Sat, 24 Oct 2020 12:42:59 -0700 (PDT) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id i4sm2792826ejz.62.2020.10.24.12.42.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Oct 2020 12:42:58 -0700 (PDT) In-Reply-To: <87y2jvwxkd.fsf@gmx.de> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:191446 Archived-At: On 24.10.2020 16:41, Michael Albinus wrote: > Dmitry Gutov writes: > >> Hi Michael, > > Hi Dmitry, > >> Not in Tramp, but I see an old change in VC that was most likely >> informed by a performance problem in Tramp. >> >> See the commit a40c87a0093. It adds caching of the result of >> vc-git-root to a VC property 'git-root' on the file name. > > This seems to be bug#11757. Huh. Looks familiar ;-) But that report was about process calls (and git.cmd being expensive), whereas vc-git-root doesn't call any external programs, it just traverses the filesystem. >> Does the change below still make some scenario perceptibly slower? >> >> diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el >> index b1880c0f7b..91554bb6d8 100644 >> --- a/lisp/vc/vc-git.el >> +++ b/lisp/vc/vc-git.el >> @@ -1573,8 +1573,7 @@ vc-git-extra-menu >> (defun vc-git-extra-status-menu () vc-git-extra-menu-map) >> >> (defun vc-git-root (file) >> - (or (vc-file-getprop file 'git-root) >> - (vc-file-setprop file 'git-root (vc-find-root file ".git")))) >> + (vc-find-root file ".git")) >> >> ;; grep-compute-defaults autoloads grep. >> (declare-function grep-read-regexp "grep" ()) > > I haven't tested. But this means to call process-file several times, > it would be a performance degradation, for sure. Could you test it, please? AFAICT locate-dominating-file doesn't call process-file.