From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandre Julliard Newsgroups: gmane.emacs.devel Subject: Re: VC / Git: amend function / mark for add / timing Date: Tue, 13 Oct 2009 22:37:19 +0200 Message-ID: <877huz114w.fsf@wine.dyndns.org> References: <9B112266-8695-41CB-A8EA-8D39833060AE@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255466317 14754 80.91.229.12 (13 Oct 2009 20:38:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2009 20:38:37 +0000 (UTC) Cc: David Reitter , spiegel@gnu.org, Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 13 22:38:26 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mxo8V-0004tq-Lt for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2009 22:38:24 +0200 Original-Received: from localhost ([127.0.0.1]:42131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxo8V-0004DQ-5Z for ged-emacs-devel@m.gmane.org; Tue, 13 Oct 2009 16:38:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mxo8P-0004Cu-Qe for emacs-devel@gnu.org; Tue, 13 Oct 2009 16:38:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mxo8L-0004C8-FY for emacs-devel@gnu.org; Tue, 13 Oct 2009 16:38:17 -0400 Original-Received: from [199.232.76.173] (port=33551 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mxo8L-0004C4-6b for emacs-devel@gnu.org; Tue, 13 Oct 2009 16:38:13 -0400 Original-Received: from mail.codeweavers.com ([216.251.189.131]:35235) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mxo8I-0002I3-4S; Tue, 13 Oct 2009 16:38:10 -0400 Original-Received: from adsl-62-167-26-219.adslplus.ch ([62.167.26.219] helo=wine.dyndns.org) by mail.codeweavers.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Mxo7X-0003fj-W1; Tue, 13 Oct 2009 15:37:45 -0500 Original-Received: by wine.dyndns.org (Postfix, from userid 1000) id 0CE381E73AE; Tue, 13 Oct 2009 22:37:19 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Tue, 13 Oct 2009 15:33:01 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Spam-Score: -3.2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116117 Archived-At: Stefan Monnier 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