help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] Extremely slow file name completion for remote drives


From: Eli Zaretskii
Subject: Re: [h-e-w] Extremely slow file name completion for remote drives
Date: Tue, 08 Apr 2008 21:48:57 +0300

> Date: Tue, 8 Apr 2008 06:40:12 +0400
> From: "Valeriy E. Ushakov" <address@hidden>
> 
> I've traced emacs20 and emacs22 using SysInternals' File Monitor 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...]

This looks like the API calls issued by `readdir', which is normal:
Emacs supports completion by reading the entire directory into memory,
then comparing the list of files with what you typed in the
minibuffer.

> 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

Strange: I don't see any change in Emacs's readdir implementation
between v20.7 and 22.2.

> I wonder if something was changed in mingw stat emulation maybe.

Did you compile Emacs yourself?  If not, could you try compiling Emacs
20.7 and 22.2 with the same MinGW version and see if their speed is
comparable?




reply via email to

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