Subject: bug#3977: 23.1.50; Tramp slows down Emacs

From: Torsten Bronger <[email-masked]>
Date: Fri, 31 Jul 2009 08:33:33 +0200

Hallöchen!

Michael Albinus writes:

> Torsten Bronger <[email-masked]> writes:
>
>> After starting Tramp, Emacs is slowed down significantly.  It is
>> sufficient to trigger Tramp just by tab-completion of a remote
>> path.  From this moment on, Emacs is slow.

It's even sufficient to say customize-group -- tramp.

> Does it also happen, when you start "emacs -Q"?

See below.

>> I can't really tell whether it is slow per se or because Tramp
>> does so many network connections in the background because I use
>> Emacs through the network itself (ssh -X).
>
> I don't believe that this matters to Tramp.

I sniffed the network activity, and I found out more.

When using Emacs locally, you don't see this effect.  However, here
at work, I start Emacs on my home machine through an SSH tunnel, and
then Tramp slows down Emacs significantly; not Emacs per se but only
the display.  For example, I can scroll through a large text file
and it needs the same amount of time.  But with Tramp, I don't see
the text scrolling, just reaching the end.

The reason seems to be that Tramp causes X network traffic
(approx. 20 TCP packages) every 5 seconds.  Apparently, it makes
Emacs talking to the local client window in a way.  The 5 seconds
are very constant.

Note that the machine I tried to open a file on with Tramp is
different from the machine which runs the X server, so I can
distinguish safely between Tramp's file system traffic and Tramp's X
traffic.

With emacs -Q, the effect is different.  I don't see time intervals
anymore, but a continuous sending of 60 TCP packages per second.  So
the effect is even worse but different.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: [email-masked]
                                  or http://bronger-jmp.appspot.com