bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52384: [External] : bug#52384: 26.3; dired buffer navigation tweak


From: Arthur Miller
Subject: bug#52384: [External] : bug#52384: 26.3; dired buffer navigation tweak
Date: Mon, 13 Dec 2021 11:14:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Date: Sun, 12 Dec 2021 20:15:44 +0100
>> Cc: Michael Perry <amperry@provide.net>, Stefan Kangas <stefan@marxist.se>,
>>  "52384@debbugs.gnu.org" <52384@debbugs.gnu.org>
>> 
>> After I posted my comment to Drew, I realized later, that
>> '--group-directories-first' does not exist in all 'ls' implementations. Bsd 
>> ls
>> does not seem to have it, correct me if I am wrong, so I am not sure it can 
>> be a
>> default for Emacs. Unless Emacs defaults to ls-lisp.el on all platforms but
>> gnu/Linux?
>
> No, ls-lisp.el is not used on any Posix hosts.

I thought so; would it be unrealistic to suggest that Emacs by default switches
to ls-lisp.el on all hosts?

I have done some measurements, not very scientific, just tested simply gnu ls vs
directory-files on my Arch Linux, with a directory ~5000 files. As I see it on
my computer, the most of time is spent on I/O, once the system has cached
inodes, it almost does not matter if I use ls binary or sl-lisp.el, or
directory-files directly:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (benchmark-run 1 (find-file "/s/backup/unsorted"))
(0.202678959 0 0.0)

ELISP> (benchmark-run 1 (directory-files "/s/backup/unsorted"))
(0.003737047 0 0.0)

ELISP> (benchmark-run 1 (find-file "/s/backup/unsorted"))
(0.001892588 0 0.0)

ELISP> (benchmark-run 1 (find-file "/s/backup/unsorted"))
(0.001898974 0 0.0)

ls is faster of course, but not like a magnitude faster.

That is off a mechanical drive.

Switching to ls-lisp.el would let Dired be stup for consistent behavior on all
platforms and we could have directories grouped by default. At least according
to web search that seems to be often asked question for both Emacs users, and
even MacOS Finder users. With other words, it seems like it is a behavior
prefered by lot of users.





reply via email to

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