This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Performance of "ls -F"


On Jan 22 22:04, Achim Gratz wrote:
> Corinna Vinschen writes:
> > Just a hint:  ls -F requires to stat every single file.  stat in turn
> > requires to load not only the usual metadata but also to fetch the ACL
> > and convert it to POSIX permissions.
> 
> The timings are from shares mounted with the noacl option, so that bit
> of code shouldn't be involved.  I will try the same operations on an ACL
> enabled mount of the same share later and I also need to find a share
> that is exported from a true NTFS server for comparison.
> 
> > Assuming this slow access only occurs under 2.4.0,
> 
> No, the behaviour is quite a bit older, although I didn't time it since
> I didn't recognize the connection to the aliased ls.  In any case, it
> really is just the determination of whether or not the file is
> executable that takes up all that time.

In the noacl case, Cygwin tries to find out if files are scripts.  It
opens the file and checks the first two bytes in the file for a shebang
(and other stuff).  This may take a lot of time, more so on network
drives.  Can you try adding the "notexec" mount option to the "noacl"
share and see if that helps?

This test is done for a looong time to accommodate FAT filesystems in
the first place.  It might be prudent to disable it by default these
days...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]