GNU bug report logs - #21383
Static revisions in vc-working-revision

Previous Next

Package: emacs;

Reported by: Jonathan H <pythonnut <at> gmail.com>

Date: Mon, 31 Aug 2015 00:47:01 UTC

Severity: wishlist

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jonathan H <pythonnut <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 21383-done <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#21383: Static revisions in vc-working-revision
Date: Thu, 3 Sep 2015 10:34:08 -0700
[Message part 1 (text/plain, inline)]
> Indeed, mode-line updates are *very* frequent (more than once per
> command), so we really want to avoid running processes at that point.

I though the new implementation of the vc-git mode line doesn't use
vc-working-revision, so in this specific case, making vc-working-revision
slower won't hurt us there.

> I wonder if that's true. Caching in a property is obviously fast, and
process calls are
necessarily an order of magnitude slower (and slower still on certain
platforms).

True, but you have to check that the cache is invalid somehow. If you want
to be super correct, a rev-parse is probably the fastest way. I suppose it
would be pretty fast to check the mtime of the .git directory inside emacs
and invalidate that when it changes. Although filesystem timestamps usually
make me nervous, it's probably okay in this instance?



On Thu, Sep 3, 2015 at 9:17 AM, Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:

> > Maybe you should write a patch and test it on Windows (or have someone
> else
> > do it), and see whether the mode-line updates don't become
> > perceptibly slower.
>
> Indeed, mode-line updates are *very* frequent (more than once per
> command), so we really want to avoid running processes at that point.
>
>
>         Stefan
>
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 262 days ago.

Previous Next


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