all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: "Eric S. Raymond" <esr@snark.thyrsus.com>
Cc: emacs-devel@gnu.org
Subject: Re: Speeding up vc-dired still more
Date: Thu, 27 Dec 2007 13:25:47 -0800	[thread overview]
Message-ID: <200712272125.lBRLPlo7020948@oogie-boogie.ics.uci.edu> (raw)
In-Reply-To: <200712271927.lBRJRNM3017565@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 27 Dec 2007 11:27:23 -0800")

Dan Nicolaescu <dann@ics.uci.edu> writes:

  > "Eric S. Raymond" <esr@snark.thyrsus.com> writes:
  > 
  >   > Dan Nicolaescu <dann@ics.uci.edu>:
  >   > > That will show  1000 calls to vc-bzr-registered, vc-git-registered,
  >   > > vc-arch-registered, vc-svn-registered etc etc.
  >   > 
  >   > Not any more.  I've added a check against
  >   > completion-ignored-extensions, encapsulated in a new function called
  >   > vc-dired-ignorable-p.
  > 
  > Thanks, much better now.
  > 
  > There's still some more performance left to be squeezed out.
  > 
  > For the Linux kernel, with 5 files modified 
  > git ls-files | wc -l
  > 22555
  > 
  > find . -type f 
  > shows a similar number.
  > 
  > The elp-results after doing an C-x v d in the kernel directory are:
  > 
  > 
  > Function Name                             Call Count  Elapsed Time  Average Time
  > ========================================  ==========  ============  ============
  > vc-directory                              1           411.40415     411.40415
  > vc-dired-hook                             1           390.315596    390.315596
  > vc-backend                                22567       350.89581700  0.0155490679
  > vc-registered                             22553       348.03225700  0.0154317499
  > vc-call-backend                           135338      344.50350300  0.0025455046
  > vc-git-registered                         22553       315.02742200  0.0139683156
  > vc-git--out-ok                            22553       301.38389399  0.0133633615
  > vc-git--call                              22553       300.84999399  0.0133396884
  > ^^^^^^^^^^^^
  > This seems to take most of the time. There are too many calls
  > vc-registered (which calls vc-git-registered, which in turn calls vc-git--call).
  > 
  > It seems that the vc-registered calls should not be necessary,
  > vc-git-dir-state should get the state for most of those files...

All those vc-registered calls are generated by calling vc-backend in
vc-dired-hook:

         ;; ordinary file -- call the (possibly expensive) state query
         (t
           (let ((backend (vc-backend filename)))
               (cond
                    ;; Not registered
                         ((not backend)

  reply	other threads:[~2007-12-27 21:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-27 14:52 Speeding up vc-dired still more Eric S. Raymond
2007-12-27 19:27 ` Dan Nicolaescu
2007-12-27 21:25   ` Dan Nicolaescu [this message]
2007-12-28  9:20     ` Eric S. Raymond
2007-12-28  2:53 ` Alexandru Harsanyi
2007-12-28  9:25   ` Eric S. Raymond
2007-12-28 10:55     ` Alexandru Harsanyi
2007-12-28 12:21       ` Eric S. Raymond

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=200712272125.lBRLPlo7020948@oogie-boogie.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=esr@snark.thyrsus.com \
    /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.