Cygwin performance (was [ANN] PW32 the...)

Egor Duda deo@logos-m.ru
Wed Mar 15 00:05:00 GMT 2000


Hi!

Ûcott Blachowicz scott@sabmail.rresearch.com wrote:

SB> Great! Have you found any way to improve the performance of commands like 'ls'
SB> against remotely mounted file systems? I frequently have things like

SB>  NET USE * \\SERVER\SHARE

SB> where SERVER is located on the far end of a PPTP link to a system a few
SB> thousand miles (18-22 hops over the Internet via an ISDN connection on my end)
SB> and doing an 'ls' is unuseably slow (and I think I've tried various releases
SB> from b17 to b20.1). So, I usually try to remember to use the "command prompt"
SB> and the DIR command which works just fine. I also wave perl scripts over the
SB> remote directories (scripts that do file globbing and file system traversals)
SB> and they run fine...but they don't try to get all the file info that an 'ls
SB> -l' would - ought to try out an 'ls' command from the Perl Power Tools set
SB> sometime...

basically, reason is following: ls uses "stat" syscall to obtain file
information. stat returns a handful of parameters, including inode,
permissions and others. to obtain _all_ that info, cygwin must open file
(see stat_worker function at winsup/cygwin/syscalls.cc). opening every
file on network share is pretty slow.

luckily, most of time application don't need _all_ stat information.
for example, if you need to get file time or owner or size only,
there's no need to open file. so, some time ago i've proposed to make
cygwin1.dll export function "stat_lite", which works similar to
"stat", but receives additional flags, showing which fields are of
interest to application. so, after that you can recompile ls to
utilize this function. i've compiled custom version of midnight
commander, and directory browsing becomes several times faster for
slow remote shares.

note: you have to recompile your application to utilize "stat_lite"
function.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list