[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: performance difference between dired and eshell
From: |
Michael Albinus |
Subject: |
Re: performance difference between dired and eshell |
Date: |
Mon, 10 Apr 2017 09:23:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Tijs Mallaerts <address@hidden> writes:
Hi Tijs,
> There seems to be a big difference in performance between running an
> "ls -l" command in eshell over tramp and opening a dired buffer for
> the same remote directory. Opening the dired buffer appears to be a
> lot faster.
>
> Is there a way to change this behavior through configuration settings?
`ls' calls the eshell function `eshell/ls':
--8<---------------cut here---------------start------------->8---
Welcome to the Emacs shell
~ $ which ls
eshell/ls is a compiled Lisp function in ‘em-ls.el’
--8<---------------cut here---------------end--------------->8---
It calls `file-attributes' for every single file. Maybe it could be
optimized to call just once `directory-files-and-attributes' instead.
If you don't want this, call the external `ls' functionalityin eshell by
--8<---------------cut here---------------start------------->8---
~ $ *ls -l
--8<---------------cut here---------------end--------------->8---
There's nothing Tramp can do in this case, except changing the timeouts
for cache expiry. But the first `ls -l' in a directory would still last long.
> Thanks!
> Tijs
Best regards, Michael.