Subject: bug#25788: 26.0.50; first C-x C-f triggering tramp is slow

From: Michael Albinus <[email-masked]>
Date: Sun, 19 Feb 2017 09:37:47 +0100

[email-masked] writes:

> I see this also on GNU/Linux (with master, not emacs-25), here's a
> backtrace from doing (debug-on-entry 'require) before the C-x C-f:
>
> Debugger entered--entering a function:
> * require(tramp-compat)
>   byte-code(...)
>   load("tramp" noerror nomessage)
>   (and (null load-in-progress) (load "tramp" (quote noerror) (quote nomessage)))
>   (let ((default-directory temporary-file-directory)) (and (null
> load-in-progress) (load "tramp" (quote noerror) (quote nomessage))))
>   (if (let ((default-directory temporary-file-directory)) (and (null
> load-in-progress) (load "tramp" (quote noerror) (quote nomessage))))
> (apply operation args) (tramp-completion-run-real-handler operation
> args))
>   tramp-autoload-file-name-handler(substitute-in-file-name "/")

I've pushed a fix to master, which shall avoid loading tramp.el just for
file name "/". Since it changes autoloads, it might be necessary to
bootstrap Emacs.

Best regards, Michael.