emacs-devel
[Top][All Lists]
Advanced

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

Re: Testing the new VC code


From: Michael Albinus
Subject: Re: Testing the new VC code
Date: Mon, 24 Nov 2014 20:39:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"Eric S. Raymond" <address@hidden> writes:

> I would be *delighted* to have you test it. Others should pile in as
> well.  I can test thoroughly under git and RCS.  I'm not really
> worried about any of the other back ends except CVS and SVN, but those
> could be trouble spots.

Well, these days I'm on a business trip, so I can access my main machine
at home remotely only. On that machine, I have different files under
version control for CVS, Bzr, Git and Hg. The Hg version I cannot test,
because there is no mercurial on the local machine, and so the remote
tests for Hg are refused.

The local machine (at work) is connected to the machine at home via ssh,
tunneled through http. Not very fast. That remote machine is called "ford"-

On the local machine I have compiled recent Emacs up to

commit 6dbaf0471927829126025f57315db02d78255790
Author: Leo Liu <address@hidden>
Date:   Mon Nov 24 22:57:53 2014 +0800

And there is another compiled Emacs with your patch on top of this

commit 52ba817b903337a9fd58fc10772cec425190a596
Author: Eric S. Raymond <address@hidden>
Date:   Mon Nov 24 08:03:56 2014 -0500

1. Test: Check a file not under vc

(let ((vc-handled-backends '(CVS Bzr Git Hg))
      (tramp-verbose 0) ;; Do not loose time in Tramp.
      (file "/pscp:ford:/usr/local/src/dbus-1.5.12/dbus/dbus.h"))
  (file-exists-p file) ;; Take initial connection time out of profiling.
  (elp-reset-all)
  (elp-instrument-function 'vc-registered)
  (dotimes (i 1000)
    (vc-registered file))
  (elp-results))

Not patched Emacs
=> vc-registered  3000        439.78873400  0.1465962446

Patched Emacs
=> vc-registered  3000        429.92892599  0.1433096419

Your version is even a little bit faster. IIRC, the heuristic functions
weren't such good for Tramp, because they have used process calls
instead of file existence checks. Tramp internal optimizations do not
work then.

2. Test: Check a file under CVS control. The CVS repository is on
   savannah

(let ((vc-handled-backends '(CVS))
      (tramp-verbose 0) ;; Do not loose time in Tramp.
  (file "/pscp:ford:/usr/local/src/tramp-2-1-stable/ChangeLog"))
  (file-exists-p file) ;; Take initial connection time out of profiling.
  (elp-reset-all)
  (elp-instrument-function 'vc-state)
  (dotimes (i 1000)
    (vc-state file))
  (elp-results))

Not patched Emacs
=> vc-state       1000        0.0019950000  1.995...e-06

Patched Emacs
=> vc-state       1000        0.0267269999  2.672...e-05

Your version is not bad, but a factor of 13 slower. So if you have a
slow connection to your CVS repository, caching would help.

3. Test: Check a file under Bzr control

(let ((vc-handled-backends '(Bzr))
      (tramp-verbose 0) ;; Do not loose time in Tramp.
      (file "/pscp:ford:/usr/local/src/emacs.sv/ChangeLog"))
  (file-exists-p file) ;; Take initial connection time out of profiling.
  (elp-reset-all)
  (elp-instrument-function 'vc-state)
  (dotimes (i 1000)
    (vc-state file))
  (elp-results))

Not patched Emacs
=> vc-state       1000        0.0019390000  1.939...e-06

Patched Emacs
=> vc-state       1000        0.0030969999  3.096...e-06

1.5 times slower. Maybe acceptable.

4. Test: Check a file under Git control

(let ((vc-handled-backends '(Git))
      (tramp-verbose 0) ;; Do not loose time in Tramp.
      (file "/pscp:ford:/usr/local/src/emacs/ChangeLog"))
  (file-exists-p file) ;; Take initial connection time out of profiling.
  (elp-reset-all)
  (elp-instrument-function 'vc-state)
  (dotimes (i 1000)
    (vc-state file))
  (elp-results))

Not patched Emacs
=> vc-state       1000        0.3676199999  0.0003676199

Patched Emacs
=> vc-state       1000        0.4226959999  0.0004226959

Again, your version is slower (15%). More surprising, both versions are
much slower than with Bzr. I guess one could improve the code for git.

Best regards, Michael.



reply via email to

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