[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tramp performance on localhost
From: |
Thierry Volpiatto |
Subject: |
tramp performance on localhost |
Date: |
Sat, 22 Mar 2014 16:43:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi Michael,
Would be great to improve performance of some handlers on localhost,
namely `file-directory-p' and friends, `directory-files' beeing slower but
still reasonnably slower.
Here some tests:
(defun test-tramp ()
(cl-loop for f in (directory-files "/sudo:localhost:/usr/bin" t)
collect (cond ((file-symlink-p f)
(cons "a symlink" f))
((file-directory-p f)
(cons "a directory" f))
(t f))))
(test-tramp)
=>test-tramp 1 13.285881913 13.285881913
(defun test-local ()
(cl-loop for f in (directory-files "/usr/bin" t)
collect (cond ((file-symlink-p f)
(cons "a symlink" f))
((file-directory-p f)
(cons "a directory" f))
(t f))))
(test-local)
=>test-local 1 0.071230466 0.071230466
(defun test-tramp-2 ()
(directory-files "/sudo:localhost:/usr/bin" t))
(test-tramp-2)
=>test-tramp-2 1 0.070956673 0.070956673
(defun test-local-2 ()
(directory-files "/usr/bin" t))
(test-local-2)
=>test-local-2 1 0.024662349 0.024662349
As you can see the performances of first test are really bad compared
with the same operation on non--remote file
(/usr/bin vs /sudo:localhost:/usr/bin).
Thanks.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- tramp performance on localhost,
Thierry Volpiatto <=