unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 11757@debbugs.gnu.org
Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times)
Date: Wed, 18 Jul 2012 16:38:27 +0200	[thread overview]
Message-ID: <87hat5xhgc.fsf_-_@gmx.de> (raw)
In-Reply-To: <50063692.7080707@yandex.ru> (Dmitry Gutov's message of "Wed, 18 Jul 2012 08:07:46 +0400")

Dmitry Gutov <dgutov@yandex.ru> 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.





  parent reply	other threads:[~2012-07-18 14:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  2:12 bug#11757: 24.1.50; vc-git calls `process-file' too many times Dmitry Gutov
     [not found] ` <handler.11757.B.13402450035158.ack@debbugs.gnu.org>
2012-06-26 10:54   ` bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Dmitry Gutov
2012-06-26 12:14     ` Michael Albinus
2012-06-28  0:51       ` Dmitry Gutov
2012-06-29 13:46         ` Michael Albinus
2012-06-29 16:06           ` Dmitry Gutov
2012-06-29 16:40             ` Michael Albinus
2012-06-29 17:03               ` Dmitry Gutov
2012-06-29 17:38                 ` Michael Albinus
2012-06-30  9:03                 ` Michael Albinus
2012-06-30 12:56                   ` Dmitry Gutov
2012-06-30 13:19                     ` Michael Albinus
2012-06-30 17:42                       ` Dmitry Gutov
2012-06-30 18:46                         ` Michael Albinus
2012-06-30 19:14                           ` Dmitry Gutov
2012-07-01  9:58                             ` Michael Albinus
2012-07-01 14:58                               ` Dmitry Gutov
     [not found]                               ` <4FF062D7.7050402@yandex.ru>
     [not found]                                 ` <878vf2sf7q.fsf@gmx.de>
2012-07-02 12:42                                   ` Dmitry Gutov
2012-07-02 12:44                                   ` Dmitry Gutov
2012-07-04 15:10                                     ` Michael Albinus
2012-07-04 16:42                                       ` Dmitry Gutov
2012-07-06 13:44                                         ` Michael Albinus
2012-07-06 15:55                                           ` Dmitry Gutov
     [not found]                                             ` <5000D21F.6080900@yandex.ru>
     [not found]                                               ` <87k3y36gbe.fsf@gmx.de>
     [not found]                                                 ` <50046AD3.1080605@yandex.ru>
     [not found]                                                   ` <87y5min9ad.fsf@gmx.de>
     [not found]                                                     ` <50063692.7080707@yandex.ru>
2012-07-18 14:38                                                       ` Michael Albinus [this message]
2012-07-18 17:01                                                         ` Dmitry Gutov
2012-06-30 23:01             ` Stefan Monnier
2012-06-30 23:38               ` Dmitry Gutov
2012-07-18 14:11 ` bug#11757: Fwd: " Michael Albinus

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hat5xhgc.fsf_-_@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=11757@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).