GNU bug report logs - #41423
27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]

Previous Next

Package: emacs;

Reported by: rrandresf <at> gmail.com

Date: Wed, 20 May 2020 16:23:02 UTC

Severity: normal

Tags: moreinfo

Merged with 47389

Found in versions 27.0.91, 27.1.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 41423 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <ghe <at> sdf.org>
To: 41423 <at> debbugs.gnu.org
Subject: Re: bug#41423: 27.0.91; eshell file completion in tramp dir is slow
 (3 minutes) [regression on pretest]
Date: Fri, 28 Aug 2020 09:32:48 +0000
>
> The root of this bug is that `eshell-complete-commands-list' loops 
> through all executables *on the remote server* with (while comps-in-path 
> ...). That means typically 1000-2000 commands to check, one by one, 
> hence the 3 minutes delay.
>
> The easy fix is to hit C-g, which stops this loop.
>

Another note: in fact this bug exists because 
`eshell-complete-commands-list' is, in this context, called in Emacs 27, 
but not in Emacs 26 and earlier.

The backtrace is:

* eshell-complete-commands-list()
  #f(compiled-function () #<bytecode 0x1e0009b1b5c5>)()
  pcomplete--here(#f(compiled-function () #<bytecode 0x1e0009b1b5c5>) nil nil nil)
  #f(compiled-function () #<bytecode 0x1fff46e348cd94>)()
  pcomplete-completions()
  pcomplete-completions-at-point()
  #f(compiled-function () #<bytecode 0xcbc6f2b2c706bdb>)()
  completion-in-region--postch()

In Emacs 26 `pcomplete--here' is called only once, with 
`pcomplete-entries' and `file-directory-p' in its `form' argument, and 
`pcomplete-completions' returns.

In Emacs 27 `pcomplete--here' is called twice with these arguments, and a 
third time with `eshell-complete-commands-list' as its `form' argument. 
It is this third call which takes about three minutes to complete.




This bug report was last modified 3 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.