Subject: Re: bug#9717: emacs hanging in windows 7

From: Eli Zaretskii <[email-masked]>
Date: Tue, 11 Oct 2011 08:39:33 -0400

> From: Argos42 <[email-masked]>
> Date: Tue, 11 Oct 2011 14:07:44 +0200
> Cc: [email-masked]
> 
> It hangs both at home on my desktop computer (Win7.32) and a laptop at
> work (Win7.64).
> At home, hangs are short while at work it can last up to 30 secs.

Can it be that the laptop has some power management policy defined
that stops the disk after some time, and Emacs waits until it spins
up?

> Files are on local HD.
> 
> I'm also wandering, is emacs trying to check my user rights over the network?

If the files are local, there's nothing for Emacs to check on the
network, I think.  But if you can install some sniffer, like windump,
and see what is the traffic on the network during these delays, that
might unlock the mystery.

> 
> In emacs -Q : same problem.
> 
> 
> Other people have/had similar issues
> (http://stackoverflow.com/questions/2007329/emacs-23-1-50-1-hangs-ramdomly-for-6-8-seconds-on-windows-xp
> http://blog.zzamboni.org/solving-hangs-in-emacs-on-windows ...)

But you said that in your case, setting w32-get-true-file-attributes
to nil didn't help, didn't you?

How about this setting:

  (setq vc-handled-backends nil)

Put it in your .emacs, restart Emacs and see if the delays go away.