简体   繁体   English

emacs流浪汉表现

[英]emacs tramp performance

Is there a way to improve emacs tramp performance? 有没有办法改善emacs流浪汉的表现? 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. 对我来说,打开外部ftp客户端(filezilla),将文件传输到本地磁盘并在外部编辑器(记事本中)打开它们比用emacs打开它们更快。 I use emacs23.1 under windows xp. 我在windows xp下使用emacs23.1。 I tried different tramp-default-method (telnet, pscp, ftp), all of them have the same performance. 我尝试了不同的tramp-default-method(telnet,pscp,ftp),它们都具有相同的性能。

Profiling results with elp-instrument-package are the following (I opened 3 remote files of 1.5 MB each one) elp-instrument-package的分析结果如下(我打开了3个1.5 MB的远程文件)

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. 因此,实际文件传输需要132秒,约占总时间的1/3。 Why does it spend so much time in tramp-sh-file-name-handler? 为什么在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. 我试图建议一个函数tramp-sh-file-name-handler来存储和返回缓存的结果,但它不起作用,可能这个函数有一些副作用。

Any ideas how to improve tramp performance? 任何想法如何提高流浪汉的表现? (I use emacs 23.1 under WindowsXP) (我在WindowsXP下使用emacs 23.1)

我发现fuse-ssh远比tramp模式好,如果你可以这样设置的话。

if your use case improves, use remote client! 如果您的用例改进,请使用远程客户端! I have resorted to editing remotely with emacs, this reminds me. 我已经使用emacs远程编辑,这让我想起了。

my experience has led me to believe the machine hosting emacs would be the bottleneck 我的经验让我相信托管emacs的机器将成为瓶颈

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. 然而,一个更好的SSH客户端可能会帮助...尝试OpenSSH.org上的列表(左侧导航中的低位)我喜欢Windows上的PuTTY,其中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. emacs的默认构建有很多lisp,但它占用的磁盘数量多于RAM空间,除了大文件和net / sys延迟之外,它总是对我有效。

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. emacs是如此庞大,当我发现它可以发送/接收电子邮件时,我注意到了最多。 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. 在这种情况下虽然'vi'可能会更好......即使有相对较多的emacs经验,我在每个阵营都使用了一小部分。 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. 我通过一些脚本解决了一个问题,这些脚本允许我mget / put和镜像文件或目录。 These scripts use lftp (a version which is installed with the cygwin) and have a very good performance. 这些脚本使用lftp(与cygwin一起安装的版本)并且具有非常好的性能。

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. 这对我很有帮助,但它不在该州出版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM