GNU bug report logs - #42966
28.0.50; vc-dir: wrong backend

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Fri, 21 Aug 2020 15:16:02 UTC

Severity: minor

Tags: fixed

Merged with 3807, 8179, 8603, 18514

Found in versions 23.3.50, 24.0.50, 24.3, 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, sds <at> gnu.org, 42966 <at> debbugs.gnu.org
Subject: bug#42966: 28.0.50; vc-dir: wrong backend
Date: Tue, 27 Oct 2020 00:11:07 +0200
On 26.10.2020 23:54, Glenn Morris wrote:
> Dmitry Gutov wrote:
> 
>>> That makes sense, but it's just a performance hack, isn't it?  The
>>> result should be the same as the less invasive "loop over all the
>>> backends and collect the most specific one".
>>
>> Pretty much. Except it should naturally limit the traversal up the
>> directory tree, so it feels like a good architecture, not just a
>> "hack".
> 
> Indeed, it just seems like the Right Thing to Do, not a hack.
> Not having been paying attention, I was surprised to see the adopted solution
> goes for "loop over every VC backend, and every directory up the tree,
> then filter the results", rather than "walk up the directory tree,
> stopping when a backend claims responsibility".

I didn't want to insist on it because upon some thinking it seemed to me 
that the remote case might be the only problematic one. And 
one-traversal-per-backend might be more optimizable by Tramp (e.g. via a 
mini-program) than one-check-per-directory-level. But perhaps the latter 
could be optimized using a file handler or an advice just as well.

> I would think efficiency matters in such a frequent operation.
> As a (completely unscientific) data point, my first single core
> bootstrap build after this change took about 5% longer than before
> (22m5s v 21m4s). But of course a single measurement means nothing.

Was that with a rotating disk?

A few more experiments should help, to establish whether that was a 
fluke or not.




This bug report was last modified 4 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.