[Top][All Lists]

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

Re: performance difference between dired and eshell

From: Tijs Mallaerts
Subject: Re: performance difference between dired and eshell
Date: Mon, 10 Apr 2017 21:01:26 +0200

2017-04-10 9:23 GMT+02:00 Michael Albinus <address@hidden>:
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.

Thanks a lot for the explanation Michael! The external 'ls' works much faster indeed.

Best regards,

reply via email to

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