unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: juri@linkov.net, 52384@debbugs.gnu.org, stefan@marxist.se,
	amperry@provide.net
Subject: bug#52384: [External] : bug#52384: 26.3; dired buffer navigation tweak
Date: Mon, 13 Dec 2021 17:21:56 +0100	[thread overview]
Message-ID: <AM9PR09MB4977AE529B2566632805995F96749@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <83fsqwmz4q.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 13 Dec 2021 15:07:49 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: juri@linkov.net,  amperry@provide.net,  stefan@marxist.se,
>>   52384@debbugs.gnu.org
>> Date: Mon, 13 Dec 2021 11:14:27 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > 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?
>
> Yes.  ls-lisp doesn't support all of the switches that GNU ls
> supports.

Yes, I know it does not.. The idea is that it does not need to support
everything. By default it only uses -la flags anyway. Users who need extra
ffeatures of gnu ls, has to add extra switches themselves anyway. Also, gnu ls
is supported out of the box, probably only on gnu/Linux systems. Those users (me
included) could set ls-lisp-use-insert-directory-program to t, as MS users do
nowadays. As said, that would allow Emacs to count on uniform interface in Dired
by default at least, and could come with option to group directories by default.

>> 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.
>
> I don't understand what you compared here.  Which results are wil ls
> and which with ls-lisp?  And why do you benchmark directory-files and
> nit insert-directory?

It was just a quick run to show that file listing is dominated by I/O
not so much by extra lisp work. First run is opening a directory which was not
opened in my system earlier, so OS has to catch it from the disk. First
find-file is with with gnu ls, other with ls-lisp.el. I threw in directory-files
since I think it is the lowest built-in to list files without additional work on
top of it. I was just after showing that performance is not suffering too much
if Emacs used ls-lisp.el by default.





  reply	other threads:[~2021-12-13 16:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  0:39 bug#52384: 26.3; dired buffer navigation tweak Michael Perry
2021-12-10  1:36 ` Stefan Kangas
2021-12-10  7:13   ` Arthur Miller
2021-12-10 17:11     ` bug#52384: [External] : " Drew Adams
2021-12-10 22:26       ` Arthur Miller
2021-12-10 22:52         ` Drew Adams
2021-12-11 14:08           ` Arthur Miller
2021-12-11 16:41             ` Drew Adams
2021-12-11 19:40       ` Juri Linkov
2021-12-11 22:06         ` Drew Adams
2021-12-12  8:41           ` Juri Linkov
2021-12-12 18:35             ` Drew Adams
2021-12-12 18:52               ` Juri Linkov
2021-12-12 19:15                 ` Arthur Miller
2021-12-12 19:28                   ` Juri Linkov
2021-12-12 19:37                   ` Eli Zaretskii
2021-12-13 10:14                     ` Arthur Miller
2021-12-13 12:24                       ` Stefan Kangas
2021-12-13 16:29                         ` Arthur Miller
2021-12-13 13:07                       ` Eli Zaretskii
2021-12-13 16:21                         ` Arthur Miller [this message]
2021-12-13 16:59                           ` Eli Zaretskii
2021-12-13 17:11                             ` Arthur Miller
2021-12-12 19:45                 ` Drew Adams
2021-12-12 20:10                   ` Juri Linkov
2021-12-10 12:00 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9PR09MB4977AE529B2566632805995F96749@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=52384@debbugs.gnu.org \
    --cc=amperry@provide.net \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).