GNU bug report logs - #20015
25.0.50; Slow Emacs startup after recent TRAMP changes

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Fri, 6 Mar 2015 06:24:01 UTC

Severity: normal

Merged with 21504

Found in version 25.0.50

Fixed in version 25.1

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 20015 <at> debbugs.gnu.org, Andreas Schwab <schwab <at> linux-m68k.org>,
 Stefan Monnier <monnier <at> IRO.UMontreal.CA>, Tassilo Horn <tsdh <at> gnu.org>
Subject: Re: bug#20015: 25.0.50; Slow Emacs startup after recent TRAMP changes
Date: Sat, 07 Mar 2015 12:35:20 +0100
Daniel Colascione <dancol <at> dancol.org> writes:

> It's also unacceptable to start six (by my count) ssh subprocesses,
> especially on systems like Cygwin, where process creation is very slow.

The code calls it only 3 times. Due to the autoload, the code of the
defconst was eval'ed twice, so it ends up in 6 calls.

I've changed it to a defcustom and checked it again. Now it is called
only 3 times, and it is called only when you open a remote file
(tramp.el is loaded).

> At the very least, this work needs to be delayed until someone tries to
> use an ssh connection method, and the result should be called.

As said above. Also not called when Emacs compiles in batch mode, and alike.

I would like to avoid these calls completely, if somebody could tell me
a robust test for knowing which kind of ControlMaster, ControlPath and
ControlPersist options are supported by the local ssh stanza. And no, I
don't want to check the ssh version; this isn't robust.

Would it be safe to install the patch in the emacs-24 branch? The change
which made Tassilo annoyed was introduced for Emacs 24.5, see Bug#19702.

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-24/lisp/net/tramp.el.~emacs-24~	2015-03-07 12:31:29.053902763 +0100
--- /home/albinus/src/emacs-24/lisp/net/tramp.el	2015-03-07 12:23:14.799675963 +0100
***************
*** 307,313 ****
  useful only in combination with `tramp-default-proxies-alist'.")
  
  ;;;###tramp-autoload
! (defconst tramp-ssh-controlmaster-options
    (let ((result "")
  	(case-fold-search t))
      (ignore-errors
--- 307,313 ----
  useful only in combination with `tramp-default-proxies-alist'.")
  
  ;;;###tramp-autoload
! (defcustom tramp-ssh-controlmaster-options
    (let ((result "")
  	(case-fold-search t))
      (ignore-errors
***************
*** 333,339 ****
  	      (setq result (concat result " -o ControlPersist=no")))))))
      result)
      "Call ssh to detect whether it supports the Control* arguments.
! Return a string to be used in `tramp-methods'.")
  
  ;;;###tramp-autoload
  (defcustom tramp-use-ssh-controlmaster-options
--- 333,342 ----
  	      (setq result (concat result " -o ControlPersist=no")))))))
      result)
      "Call ssh to detect whether it supports the Control* arguments.
! Return a string to be used in `tramp-methods'."
!     :group 'tramp
!     :version "24.5"
!     :type 'string)
  
  ;;;###tramp-autoload
  (defcustom tramp-use-ssh-controlmaster-options
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.




This bug report was last modified 9 years and 250 days ago.

Previous Next


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