bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Win32: Emacs 22.2 - Very slow file name completion for remote drives


From: Valeriy E. Ushakov
Subject: Win32: Emacs 22.2 - Very slow file name completion for remote drives
Date: Tue, 8 Apr 2008 16:50:01 +0400
User-agent: Mutt/1.4.2.3i

In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
 of 2008-03-26 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

I've been using ntemacs 20.x happily since 20.3, iirc, and have been
sticking with 20.7 for a while, mostly out of inertia.

I'm now trying to switch to 22.2 and I've run into a problem that
pretty much prevents me from switching.

I often work from home over VPN with files on remote drives at the
office.  The link is fast, so it's reasonably comfortable.  emacs20
takes maybe a second or two maximum to save a file or show filename
completion list (faster than it used to be on a uVAX, so I don't mind
:)

emacs22 OTOH is *extremely* slow when it comes to filename completeion
for remote drives.  It takes emacs22 some 10 to 30 seconds to print
"Making completion list..." and another dozen or two to actually come
up with the completion list.

When I'm actually saving a file, emacs22 saves it quite fast, just
like emacs20.  It's completion that is excruciatingly slow.  The set
of customizations I have is ~the same in both emacs20 and emacs22 and
starting emacs22 without loading ~/.emacs doesn't change anything -
same extremely long delay for filename completion.

Completion in emacs20 launched alongside is snappy.  Using native file
dialog in emacs22 is also fast, so I'm pretty much convinced the
problem is somewhere in read-file-name and callees.

I've traced emacs20 and emacs22 using File Monitor from SysInternals
(http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx) and I
see the following.

Emacs20 does for C-x C-f p:/ <TAB>

OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
QUERY INFO      P:\     SUCCESS FileNameInformation
QUERY INFO      P:\     SUCCESS FileFsVolumeInformation
QUERY INFO      P:\     SUCCESS FileFsAttributeInformation
CLOSE           P:\     SUCCESS
OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation: *
OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation: work
CLOSE           P:\     SUCCESS
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation
OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation: WINDOWS
CLOSE           P:\     SUCCESS
OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation: tmp
CLOSE           P:\     SUCCESS
[...etc, completing under 2 secs...]



While emacs22 does:

OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
QUERY INFO      P:\     SUCCESS FileNameInformation
QUERY INFO      P:\     SUCCESS FileFsVolumeInformation
QUERY INFO      P:\     SUCCESS FileFsAttributeInformation
CLOSE           P:\     SUCCESS
OPEN            P:\     SUCCESS Options: Open Directory  Access: 00100001
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation: *
OPEN            P:\work SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\work BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\work BUFFER OVERFLOW FileAllInformation
CLOSE           P:\work SUCCESS
OPEN            P:\work SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\work BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\work BUFFER OVERFLOW FileAllInformation
CLOSE           P:\work SUCCESS
DIRECTORY       P:\     SUCCESS FileBothDirectoryInformation
OPEN            P:\WINDOWS      SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\WINDOWS      BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\WINDOWS      BUFFER OVERFLOW FileAllInformation
CLOSE           P:\WINDOWS      SUCCESS
OPEN            P:\WINDOWS      SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\WINDOWS      BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\WINDOWS      BUFFER OVERFLOW FileAllInformation
CLOSE           P:\WINDOWS      SUCCESS
OPEN            P:\tmp  SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\tmp  BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\tmp  BUFFER OVERFLOW FileAllInformation
CLOSE           P:\tmp  SUCCESS
OPEN            P:\tmp  SUCCESS Options: Open  Access: 00100080
QUERY INFO      P:\tmp  BUFFER OVERFLOW FileFsVolumeInformation
QUERY INFO      P:\tmp  BUFFER OVERFLOW FileAllInformation
CLOSE           P:\tmp  SUCCESS
[...etc, taking about 22 secs...]

Further down the line I also see FileFsDeviceInformation calls
(besides FileFsVolumeInformation and FileAllInformation).


So with all those extra queries emacs22 only chugs along at few files
per second.

I've trested precompiled emacs21.3 binaries and it's as fast as
emacs20 and the File Monitor log is similar to emacs20 too.
Precompiled emacs22.1 is slow like 22.2.

I've looked into emacs22 sources and I don't see radical diffs from
emacs-21.4a sources for dired.c.  I wonder if something was changed in
mingw stat emulation maybe.


SY, Uwe
-- 
address@hidden                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]