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-开发者_StackOverflow社区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)
I've found that fuse-ssh is far better than tramp mode, if you can set it up that way.
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.
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.
精彩评论