views:

591

answers:

3

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

+2  A: 

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.

Heinzi
I will use process monitor and update my comments here
Gopalakrishnan Subramani
Completely agree. The one culprit I've noticed is remote files, usually with a variety of things like auto-revert, auto-save...
Bahbar
+7  A: 

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.

luapyad
This improves a bit. But opening a file in emacs with C-X C-F took nearly 15 seconds and sometimes it struck for seconds when navigating files. I tried using ido mode and without ido mode. the same issue
Gopalakrishnan Subramani
thanks a million luapyad!!. You saved my time in figuring out the issue. File Open seems to very slow but I can live with that.
Gopalakrishnan Subramani
A: 

Same problem on GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON - when opening a file Emacs freezes for about 10 secs, sometimes more... I have (setq w32-get-true-file-attributes nil) in my .emacs but it didn't help.

Some new information: Running "emacs -Q" doesn't make any difference. Emacs is unresponsive in such situation but the CPU doesn't seem to be overloaded (Emacs takes not more than 2% of CPU power, other applications are fully responsive).

bartkiller