Emacs 23.1.50.1 hangs ramdomly for 6-8 seconds on Windows XP

Viewed 6773

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.

Any one has solution?

I even tried using emacs win32 binaries (23.1) from gnu ftp site and that also hangs for few seconds.

Here some notable processmonitor logs

10:56:59.9888359 PM CreateFile C:\usr\spool\mail\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a

10:57:55.5073038 PM QueryAllInformationFile C:\emacs.emacs.d\auto-save-list BUFFER OVERFLOW CreationTime: 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

7 Answers

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:

; 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.

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 Monitor to see what Emacs is doing while it is hanging.

Related