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-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to