From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Date: Wed, 18 Jul 2012 16:38:27 +0200 Message-ID: <87hat5xhgc.fsf_-_@gmx.de> References: <4FF70A8A.5060500@yandex.ru> <5000D21F.6080900@yandex.ru> <87k3y36gbe.fsf@gmx.de> <50046AD3.1080605@yandex.ru> <87y5min9ad.fsf@gmx.de> <50063692.7080707@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342622361 1724 80.91.229.3 (18 Jul 2012 14:39:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 14:39:21 +0000 (UTC) Cc: 11757@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 16:39:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrVPC-0000Bz-N7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 16:39:10 +0200 Original-Received: from localhost ([::1]:49033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrVPC-0004fy-3H for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jul 2012 10:39:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrVP6-0004fN-9I for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 10:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrVOy-0008FE-Dq for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 10:39:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrVOy-0008F9-AE for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 10:38:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SrVUs-0004vW-1e for bug-gnu-emacs@gnu.org; Wed, 18 Jul 2012 10:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jul 2012 14:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11757-submit@debbugs.gnu.org id=B11757.134262268218901 (code B ref 11757); Wed, 18 Jul 2012 14:45:01 +0000 Original-Received: (at 11757) by debbugs.gnu.org; 18 Jul 2012 14:44:42 +0000 Original-Received: from localhost ([127.0.0.1]:48600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrVUX-0004um-Ok for submit@debbugs.gnu.org; Wed, 18 Jul 2012 10:44:42 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:37547) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SrVUS-0004ua-Ur for 11757@debbugs.gnu.org; Wed, 18 Jul 2012 10:44:38 -0400 Original-Received: (qmail invoked by alias); 18 Jul 2012 14:38:28 -0000 Original-Received: from p57BB9531.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.149.49] by mail.gmx.net (mp033) with SMTP; 18 Jul 2012 16:38:28 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19Gt24ek7BGC9aKx8twmc4KpdPLl6QRQxNxYQrfEo YzizvnRrFIfmBc In-Reply-To: <50063692.7080707@yandex.ru> (Dmitry Gutov's message of "Wed, 18 Jul 2012 08:07:46 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62106 Archived-At: Dmitry Gutov writes: > So I'm just doing one scenario now. If you write a different one, I > can do that next. > > Scenario: > 1. git init test (outside of Emacs) > 2. find-file in this directory (creating the new file) > 3. edit, save, `vc-next-action' (registering the new file) > 4. repeat step 3 (makes first commit) > 5. repeat step 4 (makes second commit) > 6. `vc-rename-file' > 7. `vc-next-action' (commit) > 8. `vc-delete-file' This scenario seems to be sufficient. > Done this twice, logs 1 and 3 - without the patch, 2 and 4 - with the > patch. 1 ~ 3 and 2 ~ 4, so you may just as well compare only one pair. > > The difference: a few getprop/setprop calls, and one full uncached > vc-git-registered' call in `vc-register' (after "git add" was called), > all in favor of the patched version (which doesn't make the above > calls). Yes. Just naively counting `process-file' calls, the unpatched version uses 27 calls, and the patched version needs 26. This is likely, because the patched version doesn't call `vc-git-registered' in `vc-git-state'. > This would have been different if the file existed and was registered > in the repository before step 2, then the first call to > vc-git-registered' would have returned `t' in both versions. Likely, it doesn't matter. Such a scenario is not what we can expect to happen often (open an unregistered file in Emacs, it is registered outside Emacs, and we try to register it inside Emacs). It will result in an error, that's it. Finally, I will apply your patch to vc-git.el. Thanks for all your tests! > P.S. `ediff' says there are no differences after around 43% mark, but > there are. For example, line 1021 in trace-3.log shows a call to > vc-git-registered', whereas the respective line 979 in trace-4.log > shows that the call is skipped. No problem here. That chunk is shown to me by ediff. > --Dmitry Best regards, Michael.