From: Alexandre Julliard <julliard@winehq.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: David Reitter <david.reitter@gmail.com>,
spiegel@gnu.org,
Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: VC / Git: amend function / mark for add / timing
Date: Tue, 13 Oct 2009 22:37:19 +0200 [thread overview]
Message-ID: <877huz114w.fsf@wine.dyndns.org> (raw)
In-Reply-To: <jwveip7drnk.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 13 Oct 2009 15:33:01 -0400")
Stefan Monnier <monnier@IRO.UMontreal.CA> 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
julliard@winehq.org
prev parent reply other threads:[~2009-10-13 20:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 0:30 VC / Git: amend function / mark for add / timing David Reitter
2009-10-12 6:55 ` David Kastrup
2009-10-13 17:28 ` Dan Nicolaescu
2009-10-13 22:34 ` Juri Linkov
2009-10-13 19:33 ` Stefan Monnier
2009-10-13 20:37 ` Alexandre Julliard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877huz114w.fsf@wine.dyndns.org \
--to=julliard@winehq.org \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
--cc=spiegel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.