emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VC / Git: amend function / mark for add / timing


From: Alexandre Julliard
Subject: Re: VC / Git: amend function / mark for add / timing
Date: Tue, 13 Oct 2009 22:37:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Currently VC's design is that it assesses the file's VC-status (mostly,
> whether or not it's under VC control and if so, under which backend and
> what is its current revision number and/or modification status) when the
> file gets opened, synchronously.
>
> This presumes that vc-registered is very quick.  If it is not, we have
> a problem.  In the case of Git, I believe there's no easy way for Emacs
> to figure out whether a file is under Git's control short of running
> Git, so the speed of vc-registered will depend on the speed of Git.

I believe that vc-git-registered is fast, but vc-git-state can be slow,
because git-diff-index unpacks the tree objects for all the files in the
head commit to check them against the index. On an unpacked repo with a
cold disk cache that can take a while.

I don't see a way to get a proper status without doing a diff-index, but
it would probably be possible to fix Git to apply the pathname filter at
a higher level to avoid accessing unnecessary objects.

-- 
Alexandre Julliard
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]