all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tim Vaughan <timv@ughan.xyz>,
	rrandresf@gmail.com, Michael Albinus <michael.albinus@gmx.de>,
	41423@debbugs.gnu.org
Subject: bug#41423: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]
Date: Tue, 1 Sep 2020 10:31:14 +0200 (CEST)	[thread overview]
Message-ID: <alpine.NEB.2.22.394.2009011003160453.3798@sdf.lonestar.org> (raw)
In-Reply-To: <jwvh7sirwcu.fsf-monnier+emacs@gnu.org>


>
>> 26. therefore pcomplete-completions does not call pcomplete/cd but 
>> eshell-complete-commands-list
>
> I guess this is the culprit
>

No, see below.

>
> and this is where the time is spent.
>

Yes, this is what I said.

>
> `eshell-complete-commands-list` eagerly builds the list of possible 
> candidates and it takes a while whereas we should here return something 
> quickly and cheaply, e.g. by returning a function which will build and 
> return this list more lazily when completion is actually performed.
>

No, the bug is in the completion mechanism, not in eshell.  I don't know 
exactly (because the mechanism is so complicated) where the completion 
functions should be fixed, but it is clear that there is no reason to call 
pcomplete-completions-at-point *three* times.

There is no reason to call pcomplete-completions-at-point when RET is 
pressed.

Typing "cd foo/ RET" does not call pcomplete-completions-at-point. 
Typing "cd foo TAB RET" should only call pcomplete-completions-at-point to 
add the trailing slash, and should not build a list of all possible 
commands.

>
> Of course, the slowdown will presumably still be seen when you do 
> actually want to complete a command name, so we should probably try and 
> figure out more precisely where the slowdown comes from and how to 
> avoid/reduce it.
>

That's another, separate issue, and it is not relevant here.  BTW, when 
you want to complete a command name, at least you have some characters in 
the prefix (or if you don't, you expect that listing all candidates will 
be slow).

Typing "cd TAB" works almost instantaneously (and prints "Sole 
completion"), even on a remote host.  Typing "ls TAB" works almost 
instantaneously, too, even on a remote host.  It prints "Complete, but not 
unique", and pressing TAB again lists the alternate completion candidates. 
Typing "l TAB" takes (on a remote host) five to ten seconds before 
printing all completion candidates, but again this is what a user expects.

Nobody expects that typing RET, when the completion has already been done, 
would take three minutes.

>
> Maybe `tramp-eshell-directory-change` should tell 
> `eshell-complete-commands-list` to cache the list and also not to bother 
> checking `file-executable-p`?
>

That's yet another, separate issue, that is not relevant here.  Indeed 
there are possible improvements in eshell and tramp, but this bug is in 
the completion mechanism, not in eshell or in tramp.





  reply	other threads:[~2020-09-01  8:31 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 16:20 bug#41423: 27.0.91; tramp regression on pretest rrandresf
     [not found] ` <handler.41423.B.158999173030371.ack@debbugs.gnu.org>
2020-05-20 17:35   ` bug#41423: additional info andrés ramírez
2020-05-28 11:48     ` bug#41423: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest] (was: bug#41423: additional info) Michael Albinus
2021-02-01  2:45       ` bug#41423: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest] Stefan Monnier
2021-02-01  4:36         ` bug#41423: Installing the fix for bug#41423 on emacs-27 (was: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]) Stefan Monnier
2021-02-01  9:59           ` bug#41423: Installing the fix for bug#41423 on emacs-27 Michael Albinus
2021-02-01 14:47           ` bug#41423: Installing the fix for bug#41423 on emacs-27 (was: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]) Eli Zaretskii
2021-02-01 15:33             ` bug#41423: Installing the fix for bug#41423 on emacs-27 Stefan Monnier
2021-02-01 15:53               ` andrés ramírez
2021-02-01 16:13                 ` Stefan Monnier
2021-02-01 17:35                   ` andrés ramírez
2022-06-27  8:29                   ` bug#41423: bug#47389: 27.1.91; completion issue on eshell Lars Ingebrigtsen
2022-06-27 11:37                     ` andrés ramírez
2022-06-27 11:44                       ` Lars Ingebrigtsen
2020-08-19 10:24 ` bug#41423: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest] Tim Vaughan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-27 14:38 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-28  9:32   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-28 13:17     ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-28 23:15       ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-29 12:38         ` Michael Albinus
2020-08-29 15:44           ` Stefan Monnier
2020-08-29 16:12             ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-30  3:55               ` Stefan Monnier
2020-08-30 22:28                 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-31  8:30                   ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01  4:23                   ` Stefan Monnier
2020-09-01  8:31                     ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-09-01 10:14                       ` Eli Zaretskii
2020-09-01 11:50                         ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 13:08                           ` Stefan Monnier
2020-09-01 13:30                             ` Stefan Monnier
2020-09-01 15:41                               ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-01 13:04                       ` Stefan Monnier
2020-09-01 15:40                         ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-02  0:31                           ` Stefan Monnier
2020-09-02 10:26                             ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-02 10:33                               ` Michael Albinus
2020-09-02 16:00                                 ` Drew Adams
2021-01-31 17:07                                   ` xristos--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-02 16:36                               ` Stefan Monnier
2020-09-02 19:52                                 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-02 20:08                                   ` Stefan Monnier
2020-08-29 13:08 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-29 16:54   ` Michael Albinus
2020-08-29 17:14     ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-29 17:28       ` Michael Albinus
2021-04-21 16:06 ` bug#41423: Installing the fix for bug#41423 on emacs-27 Andrés Ramírez
2021-04-23 22:14   ` Stefan Monnier
2021-04-24  3:37     ` andrés ramírez

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

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

  git send-email \
    --in-reply-to=alpine.NEB.2.22.394.2009011003160453.3798@sdf.lonestar.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=41423@debbugs.gnu.org \
    --cc=ghe@sdf.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=rrandresf@gmail.com \
    --cc=timv@ughan.xyz \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.