Emacs 23.1.50.1 在 Windows XP 上随机挂起 6-8 秒
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2007329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Emacs 23.1.50.1 hangs ramdomly for 6-8 seconds on Windows XP
提问by luapyad
I have EmacsW32 23.1.50.1 emacs working on my windows XP machine. It hangs randomly for 5 to 8 seconds and quite frustrating.
我的 Windows XP 机器上有 EmacsW32 23.1.50.1 emacs。它随机挂起 5 到 8 秒,非常令人沮丧。
Any one has solution?
有人有解决方案吗?
I even tried using emacs win32 binaries (23.1) from gnu ftp site and that also hangs for few seconds.
我什至尝试使用来自 gnu ftp 站点的 emacs win32 二进制文件 (23.1) 并且它也挂了几秒钟。
Here some notable processmonitor logs
这里有一些值得注意的 processmonitor 日志
10:56:59.9888359 PM CreateFileC:\usr\spool\mail\ PATH NOT FOUNDDesired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a
10:56:59.9888359 PM 的CreateFileC:\ USR \阀芯\邮件\ 路径未找到所需的访问:读取数据/列出目录,同步,处理方式:开放,选项:目录,同步IO非警报,属性:N / A,共享模式:读取、写入、分配大小:不适用
10:57:55.5073038 PM QueryAllInformationFileC:\emacs.emacs.d\auto-save-list BUFFER OVERFLOWCreationTime: 8/27/2009 12:51:26 PM, LastAccessTime: 1/5/2010 10:54:40 PM, LastWriteTime: 1/5/2010 10:08:15 PM, ChangeTime: 1/5/2010 10:08:15 PM, FileAttributes: D, AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 0x1000000001f702, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
10:57:55.5073038 PM QueryAllInformationFileC:\emacs.emacs.d\auto-save-list BUFFER OVERFLOWCreationTime: 8/27/2009 12:51:26 PM, LastAccessTime: 1/5/2010 10:54: , LastWriteTime: 1/5/2010 10:08:15 PM, ChangeTime: 1/5/2010 10:08:15 PM, FileAttributes: D, AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory : True, IndexNumber: 0x1000000001f702, EaSize: 0, Access: Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Word
回答by luapyad
I had exactly the same problem using EmacsW32 23.1.50 on WinXP. One change I made that had a significant improvement (for me anyway) was to add the following to my .emacs
file:
我在 WinXP 上使用 EmacsW32 23.1.50 时遇到了完全相同的问题。我所做的一项有重大改进的更改(无论如何对我来说)是将以下内容添加到我的.emacs
文件中:
; try to improve slow performance on windows.
(setq w32-get-true-file-attributes nil)
It seems this variable was changed to default to "true" relatively recently and is known to cause some slow-down problems around file access. I still get some random hangs now and then (probably due to my .emacs
customisations) but it is much better now.
似乎这个变量最近被更改为默认为“true”,并且已知会导致一些文件访问速度变慢的问题。我仍然会时不时地遇到一些随机挂起(可能是由于我的.emacs
自定义),但现在好多了。
回答by statkwon
Please try stopping Netlogon service in "Services" control panel. That solved the problem in my case. See the excellent article http://www.hydrus.org.uk/journal/emacs-netlogon.htmlthat saved me from the agony.
请尝试在“服务”控制面板中停止 Netlogon 服务。这解决了我的问题。请参阅使我免于痛苦的优秀文章http://www.hydrus.org.uk/journal/emacs-netlogon.html。
This only applies to a small (yet increasing?) group of users that:
这仅适用于一小部分(还在增加?)用户组:
- use corp issue laptop
- use windows 7
- use emacs for R editor
- suddenly see her emacs working very slow
- 使用公司问题笔记本电脑
- 使用 Windows 7
- 使用 emacs 作为 R 编辑器
- 突然看到她的 emacs 工作得很慢
回答by Joe V.
I was having similar issues and traced it to network timeouts on Windows. In my particular case, it was due to ido.el, which keeps a cached list of directory contents. At startup, ido was trying to check the cached directories, which included network shares on both my home network and my work network – there were always some nonexistent hosts, no matter which network I was on.
我遇到了类似的问题,并将其追溯到 Windows 上的网络超时。在我的特殊情况下,这是由于 ido.el,它保留了目录内容的缓存列表。在启动时,ido 试图检查缓存的目录,其中包括我的家庭网络和我的工作网络上的网络共享——总是有一些不存在的主机,无论我在哪个网络上。
Because my problem was originating with ido (sort of), the solution for me was to set ido-max-dir-file-cache to 0 (via customize-variable or init.el), then exit Emacs, delete ~/.emacs.d/.ido.last, and restart Emacs. Based on what I saw in another thread, it's important to make sure all instances of Emacs are closed before trying to delete .ido.last. There may be other ido variables that need to be changed, but so far, this solution is working for me.
因为我的问题源于 ido(有点),所以我的解决方案是将 ido-max-dir-file-cache 设置为 0(通过自定义变量或 init.el),然后退出 Emacs,删除 ~/.emacs .d/.ido.last,然后重启 Emacs。根据我在另一个线程中看到的内容,在尝试删除 .ido.last 之前确保关闭所有 Emacs 实例非常重要。可能还有其他 ido 变量需要更改,但到目前为止,此解决方案对我有用。
回答by Heinzi
Without some debugging output it will be difficult to say what is causing the delay.
如果没有一些调试输出,将很难说出导致延迟的原因。
Since delays are often caused by IO operation timeouts, I recommend running Process Monitorto see what Emacs is doing while it is hanging.
由于延迟通常是由 IO 操作超时引起的,我建议运行Process Monitor以查看 Emacs 在挂起时在做什么。
回答by Karim Ahmed
I have windows 7, that was happening to me because i was using Classic Windows UI, once i changed to the default theme it worked great, maybe also Themes service has something to do with that, so if you stopped it, try running it.
我有 Windows 7,这发生在我身上,因为我使用的是经典 Windows UI,一旦我更改为默认主题,它就很好用,也许主题服务也与此有关,所以如果您停止了它,请尝试运行它。
回答by Mike
After disabling global-auto-revert-mode, the system does far less I/O. For me, this seemed to have solved the problem.
禁用 global-auto-revert-mode 后,系统执行的 I/O 少得多。对我来说,这似乎解决了问题。
回答by sturgman
This is related to the disabling netlogon answer. It turned out that turning off netlogon was giving me issues with networked drives so it was a nuisance to disable it. I discovered that a long time I switched my dns provided to google's public dns. This turns out to be a very bad idea in a corporate domain. I switched it back to auto-detect dns and the problem went away.
这与禁用 netlogon 答案有关。事实证明,关闭 netlogon 会给我带来网络驱动器的问题,因此禁用它很麻烦。我发现很长一段时间我将提供的 dns 切换到 google 的公共 dns。事实证明,这在公司领域中是一个非常糟糕的主意。我将其切换回自动检测 dns,问题就消失了。