emacs 流浪者性能
有没有办法提高 emacs 的流浪性能?对我来说,打开外部 ftp 客户端(filezilla)、将文件传输到本地磁盘并在外部编辑器(记事本)中打开它们比使用 emacs 打开它们更快。 我在windows xp下使用emacs23.1。 我尝试了不同的tramp-default-method(telnet、pscp、ftp),它们都具有相同的性能。
使用 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
因此,实际文件传输需要 132 秒,大约是总时间的 1/3。为什么它在tramp-sh-file-name-handler上花费这么多时间?我尝试建议函数 trap-sh-file-name-handler 来存储和返回缓存结果,但它不起作用,可能这个函数有一些副作用。
有什么想法可以提高流浪汉的表现吗? (我在WindowsXP下使用emacs 23.1)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现如果你能这样设置的话,fuse-ssh 比 Tramp 模式要好得多。
I've found that fuse-ssh is far better than tramp mode, if you can set it up that way.
如果您的用例有所改善,请使用远程客户端!我已经求助于 emacs 进行远程编辑,这提醒了我。
我的经验让我相信托管 emacs 的机器将是瓶颈,
但是更好的 SSH 客户端可能会有所帮助...尝试 OpenSSH.org 上的列表(左侧导航下方)我喜欢 Windows 上的 PuTTY,其中选择 = 复制 & ;右键单击=粘贴。
但不确定如何提高远程性能。 emacs 的默认版本有很多 lisp,但它占用的磁盘空间多于 RAM 空间,并且对我来说一直都很高效,除了大文件和文件之外。网络/系统滞后。
如果您的案例具有您不想要的突出显示和自动功能,那么最小配置可能会有所帮助 - 应该能够在不重建的情况下做到这一点。
emacs 是如此庞大,当我发现它可以发送/接收电子邮件时,我注意到最多。我几乎还没有探索到冰山一角。
在这种情况下,虽然“vi”可能更好......即使相对而言有更多的 emacs 经验,我在每个阵营中都使用了一小部分。我很少编写脚本或寻找新功能,挖掘工作很困难,但两者都有方便的命令指南。
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.
我通过几个脚本解决了问题,这些脚本允许我管理/放置和镜像文件或目录。这些脚本使用lftp(与cygwin一起安装的版本)并且具有非常好的性能。
他们要求发布我的解决方案。不幸的是,我只有它的原型。我没有时间完成它。它对我很有帮助,但它还没有达到要发布的状态。
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.