emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speeding up vc-dired still more


From: Dan Nicolaescu
Subject: Re: Speeding up vc-dired still more
Date: Thu, 27 Dec 2007 13:25:47 -0800

Dan Nicolaescu <address@hidden> writes:

  > "Eric S. Raymond" <address@hidden> writes:
  > 
  >   > Dan Nicolaescu <address@hidden>:
  >   > > 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 via email to

[Prev in Thread] Current Thread [Next in Thread]