> Date: Tue, 8 Apr 2008 06:40:12 +0400
> From: "Valeriy E. Ushakov" <[EMAIL PROTECTED]>
> 
> 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