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]

Slow stat() on noacl mounts due to x permission check

Cygwin stat() may be much slower on noacl mounts than on acl mounts.This is because on noacl mounts the x-permission bit is guessed by checking for "#!", ":" or "MZ" in the first bytes of the file. AFAIKS this is done for all files except *.exe, *.lnk and *.com.

A real world testcase with 20120201 snapshot on a (C++/Java development) tree with ~52000 files in ~12000 dirs:

.                            noacl  acl
find -size ... (after boot)   518s  51s
find -size ... (disk cached)   13s   8s
find -name ... (disk cached)    3s   3s (does not need stat())

Is it really needed to do the header check for each file?

Would it break important use cases if the check is only done for files with typical script file extensions?
For example: no extension, .sh, .csh, .pl, .py, ...

Another more flexible solution would be a mount option to configure this.
(xguess=0: no check; 1: some extensions only; 2: all files)


-- Problem reports: FAQ: Documentation: Unsubscribe info:

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