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)