emacs tramp performance
Asked Answered
C

3

7

Is there a way to improve emacs tramp performance? For me it's faster to open an external ftp client (filezilla), transfer files to the local disk and open them in an external editor (notepad) than open them with emacs. I use emacs23.1 under windows xp. I tried different tramp-default-method (telnet, pscp, ftp), all of them have the same performance.

Profiling results with elp-instrument-package are the following (I opened 3 remote files of 1.5 MB each one)

tramp-file-name-handler                                1461        350.41599999  0.2398466803
tramp-sh-file-name-handler                             1461        350.02699999  0.2395804243
tramp-send-command                                     227         179.63400000  0.7913392070
tramp-send-command-and-check                           205         177.77600000  0.8672000000
tramp-wait-for-regexp                                  227         176.47800000  0.7774361233
tramp-wait-for-output                                  226         176.40000000  0.7805309734
tramp-barf-unless-okay                                 18          133.46699999  7.4148333333
tramp-handle-insert-file-contents                      3           132.046       44.015333333
tramp-handle-file-local-copy                           3           131.281       43.760333333
tramp-accept-process-output                            2375        112.95100000  0.0475583157

So, actual file transfer takes 132 sec, about 1/3 of total time. Why does it spend so much time in tramp-sh-file-name-handler? I tried to advice a function tramp-sh-file-name-handler to store and return cached results but it does not work, probably this function has some side effects.

Any ideas how to improve tramp performance? (I use emacs 23.1 under WindowsXP)

Cierracig answered 12/10, 2009 at 6:57 Comment(1)
elp profiling results are "inclusive"; any function tramp-file-name-handler calls shows up in its timing data. Basically, you are spending half your time waiting for IO, and another half doing something. I just deal with this stuff on the OS level; sshfs for linux, SFTPDrive for Windows, etc.Parish
C
0

I resolved a problem by a couple of scripts which allow me to mget/put and mirror files or directories. These scripts use lftp (a version which is installed with the cygwin) and have a very good performance.

They were demands to publish my solution. Unfortunately, I have only a prototype of it. I have no time to finish it. It serves me well but it's not in the state to be published.

Cierracig answered 26/11, 2009 at 9:54 Comment(0)
S
2

I've found that fuse-ssh is far better than tramp mode, if you can set it up that way.

Systaltic answered 15/11, 2009 at 22:34 Comment(1)
Thanks for your answer. I didn't find an easy way to setup fuse on windows. There is a Japanese project Ducan, which is supposed to do something similar but I wasn't able to install it. Do you know how to make it work under Windows?Cierracig
J
0

if your use case improves, use remote client! I have resorted to editing remotely with emacs, this reminds me.

my experience has led me to believe the machine hosting emacs would be the bottleneck

however a better SSH client may help... try the list at OpenSSH.org (low in the left nav) I like PuTTY on Windows, where selection=copy & right-click=paste.

not sure of ways to improve the remote performance, though. the default build of emacs has a lot of lisp but it takes more disk than RAM space, and has always been efficient for me excepting large files & net/sys lag.

if your case has highlighting and auto-features you don't want, then configuring minimally might help - should be able to do that without rebuilding.

emacs is so vast, I noticed most when I found out it can send/receive e-mail. I have hardly explored the tip of the iceberg.

in this case though 'vi' may be better... even with more emacs experience relatively I've used small portions in each camp. rarely do I script or seek out a new feature, the digging is tough but there are handy command guides for both.

Jolt answered 24/11, 2009 at 6:11 Comment(1)
Thanks for your answer. I need to connect from my client to different remote machines, so a remote client is not a solution for me. Yes, I can use vi but I created a lot of scripts for emacs which I need. And I use emacs as a file manager, not only as an editor.Cierracig
C
0

I resolved a problem by a couple of scripts which allow me to mget/put and mirror files or directories. These scripts use lftp (a version which is installed with the cygwin) and have a very good performance.

They were demands to publish my solution. Unfortunately, I have only a prototype of it. I have no time to finish it. It serves me well but it's not in the state to be published.

Cierracig answered 26/11, 2009 at 9:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.